John Ehresman
2014-06-26 23:20:27 UTC
Hi,
When deleting a rectangular selection with the backspace key, I'm seeing
too many characters on the 2nd+ lines deleted. The cause seems to be
RefreshStyleData being called after the characters on the 1st line are
deleted and calling SetRectangularRange which resets the selection based
on rangeRectangular.
The following patch to Selection::MovePositions seems to fix it, though
I don't know if it's the right thing to do:
--- a/src/Selection.cxx Mon Jun 23 16:50:46 2014 -0600
+++ b/src/Selection.cxx Thu Jun 26 19:14:41 2014 -0400
@@ -278,6 +278,10 @@
ranges[i].caret.MoveForInsertDelete(insertion, startChange, length);
ranges[i].anchor.MoveForInsertDelete(insertion, startChange, length);
}
+ if (selType == selRectangle) {
+ rangeRectangular.caret.MoveForInsertDelete(insertion,
startChange, length);
+ rangeRectangular.anchor.MoveForInsertDelete(insertion,
startChange, length);
+ }
}
void Selection::TrimSelection(SelectionRange range) {
Thanks,
John
When deleting a rectangular selection with the backspace key, I'm seeing
too many characters on the 2nd+ lines deleted. The cause seems to be
RefreshStyleData being called after the characters on the 1st line are
deleted and calling SetRectangularRange which resets the selection based
on rangeRectangular.
The following patch to Selection::MovePositions seems to fix it, though
I don't know if it's the right thing to do:
--- a/src/Selection.cxx Mon Jun 23 16:50:46 2014 -0600
+++ b/src/Selection.cxx Thu Jun 26 19:14:41 2014 -0400
@@ -278,6 +278,10 @@
ranges[i].caret.MoveForInsertDelete(insertion, startChange, length);
ranges[i].anchor.MoveForInsertDelete(insertion, startChange, length);
}
+ if (selType == selRectangle) {
+ rangeRectangular.caret.MoveForInsertDelete(insertion,
startChange, length);
+ rangeRectangular.anchor.MoveForInsertDelete(insertion,
startChange, length);
+ }
}
void Selection::TrimSelection(SelectionRange range) {
Thanks,
John
--
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.