On 08/16/2007 02:29:44 PM, Neil Hodgson wrote:
> Nick Treleaven:
>
> > OK, great - I just got around to doing this instead. Should I make
> a
> > patch to add SCI_DELWORDRIGHTEND for Editor.cxx?
>
> Yes.
>
OK, attached. (I didn't update the docs though).
> > (If so, should there
> > be a SCI_DELWORDLEFTEND for symmetry?).
>
> Only if there is a real difference in behaviour. The Windows and
> GTK+ behaviours look equivalent for Ctrl+Backspace.
>
Yes, it's not necessary.
Thanks,
Nick
Index: include/Scintilla.h
===================================================================
RCS file: /cvsroot/scintilla/scintilla/include/Scintilla.h,v
retrieving revision 1.193
diff -u -r1.193 Scintilla.h
--- include/Scintilla.h 26 Jul 2007 07:28:36 -0000 1.193
+++ include/Scintilla.h 16 Aug 2007 16:14:43 -0000
@@ -505,6 +505,7 @@
#define SCI_ZOOMOUT 2334
#define SCI_DELWORDLEFT 2335
#define SCI_DELWORDRIGHT 2336
+#define SCI_DELWORDRIGHTEND 2518
#define SCI_LINECUT 2337
#define SCI_LINEDELETE 2338
#define SCI_LINETRANSPOSE 2339
Index: include/Scintilla.iface
===================================================================
RCS file: /cvsroot/scintilla/scintilla/include/Scintilla.iface,v
retrieving revision 1.319
diff -u -r1.319 Scintilla.iface
--- include/Scintilla.iface 31 Jul 2007 04:06:57 -0000 1.319
+++ include/Scintilla.iface 16 Aug 2007 16:14:45 -0000
@@ -1318,6 +1318,9 @@
# Delete the word to the right of the caret.
fun void DelWordRight=2336(,)
+# Delete the word to the right of the caret, but not the trailing non-word characters.
+fun void DelWordRightEnd=2518(,)
+
# Cut the line containing the caret.
fun void LineCut=2337(,)
Index: src/Editor.cxx
===================================================================
RCS file: /cvsroot/scintilla/scintilla/src/Editor.cxx,v
retrieving revision 1.400
diff -u -r1.400 Editor.cxx
--- src/Editor.cxx 28 Jul 2007 01:04:59 -0000 1.400
+++ src/Editor.cxx 16 Aug 2007 16:14:49 -0000
@@ -3933,6 +3933,7 @@
case SCI_VCHOMEWRAPEXTEND:
case SCI_DELWORDLEFT:
case SCI_DELWORDRIGHT:
+ case SCI_DELWORDRIGHTEND:
case SCI_DELLINELEFT:
case SCI_DELLINERIGHT:
case SCI_LINECOPY:
@@ -4494,6 +4495,11 @@
pdoc->DeleteChars(currentPos, endWord - currentPos);
}
break;
+ case SCI_DELWORDRIGHTEND: {
+ int endWord = pdoc->NextWordEnd(currentPos, 1);
+ pdoc->DeleteChars(currentPos, endWord - currentPos);
+ }
+ break;
case SCI_DELLINELEFT: {
int line = pdoc->LineFromPosition(currentPos);
int start = pdoc->LineStart(line);
@@ -7171,6 +7177,7 @@
case SCI_ZOOMOUT:
case SCI_DELWORDLEFT:
case SCI_DELWORDRIGHT:
+ case SCI_DELWORDRIGHTEND:
case SCI_DELLINELEFT:
case SCI_DELLINERIGHT:
case SCI_LINECOPY:
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest