Paul K
2014-04-30 01:41:31 UTC
Neil,
I ran across a problem with MultiPaste in wxSTC control. I suspect the
issue is in wxwidgets, but I'd like to confirm that and a proper patch for
it before I propose a fix.
I have this simple (Lua) script to test MultiPaste:
e:SetText("12 34 56 Multi-selection paste")
e:SetMultipleSelection(1)
e:SetAdditionalCaretsBlink(1)
e:SetAdditionalSelectionTyping(1)
e:SetMultiPaste(1)
e:SetSelection(0, 2)
e:AddSelection(3, 5)
e:AddSelection(6, 8)
e:Paste()
I expect it to replace 12, 34, and 56 with the content of the clipboard,
but it only replaces the main selection.
I think this is because the implementation of Paste in wxwidgets only does
one InsertString (src/stc/ScintillaWX.cpp):
int caretMain = sel.MainCaret();
pdoc->InsertString(caretMain, buf, len);
SetEmptySelection(caretMain + len);
Should this be replaced with InsertPaste?
int caretMain = sel.MainCaret();
InsertPaste(sel, buf, len);
SetEmptySelection(caretMain + len);
I couldn't find any other method that is referencing SC_MULTIPASTE_EACH.
Thank you.
Paul.
I ran across a problem with MultiPaste in wxSTC control. I suspect the
issue is in wxwidgets, but I'd like to confirm that and a proper patch for
it before I propose a fix.
I have this simple (Lua) script to test MultiPaste:
e:SetText("12 34 56 Multi-selection paste")
e:SetMultipleSelection(1)
e:SetAdditionalCaretsBlink(1)
e:SetAdditionalSelectionTyping(1)
e:SetMultiPaste(1)
e:SetSelection(0, 2)
e:AddSelection(3, 5)
e:AddSelection(6, 8)
e:Paste()
I expect it to replace 12, 34, and 56 with the content of the clipboard,
but it only replaces the main selection.
I think this is because the implementation of Paste in wxwidgets only does
one InsertString (src/stc/ScintillaWX.cpp):
int caretMain = sel.MainCaret();
pdoc->InsertString(caretMain, buf, len);
SetEmptySelection(caretMain + len);
Should this be replaced with InsertPaste?
int caretMain = sel.MainCaret();
InsertPaste(sel, buf, len);
SetEmptySelection(caretMain + len);
I couldn't find any other method that is referencing SC_MULTIPASTE_EACH.
Thank you.
Paul.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.