aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-08-18 03:45:08 +0000
committernyamatongwe <devnull@localhost>2007-08-18 03:45:08 +0000
commit7af28ed0ae8321ec8c871f81598a0313c0dba7f6 (patch)
tree47d6ae8b89c72fe02d152a43c486196a9f43ce34
parent4228fb9cd91c9778ec90b3f0d34859684642c85d (diff)
downloadscintilla-mirror-7af28ed0ae8321ec8c871f81598a0313c0dba7f6.tar.gz
Addition of DelWordRightEnd by Nick Treleaven eases compatibility with
common GTK+ behaviour.
-rw-r--r--doc/ScintillaDoc.html4
-rw-r--r--doc/ScintillaHistory.html3
-rw-r--r--include/Scintilla.h1
-rw-r--r--include/Scintilla.iface3
-rw-r--r--src/Editor.cxx7
5 files changed, 18 insertions, 0 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index e13b71775..7da1fd899 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -3678,10 +3678,14 @@ struct TextToFind {
<td><code>SCI_DELETEBACK</code></td>
<td><code>SCI_DELETEBACKNOTLINE</code></td>
+ </tr>
+ <tr>
<td><code>SCI_DELWORDLEFT</code></td>
<td><code>SCI_DELWORDRIGHT</code></td>
+
+ <td><code>SCI_DELWORDRIGHTEND</code></td>
</tr>
<tr>
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index ec49e365e..2689194a5 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -306,6 +306,9 @@
<td>chupakabra</td>
<td>Juan Carlos Arevalo Baeza</td>
</tr>
+ </tr><tr>
+ <td>Nick Treleaven</td>
+ </tr>
</table>
<p>
Images used in GTK+ version
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 144402ba6..757587259 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -505,6 +505,7 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#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
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index c2e5e7cc0..dfc65f4da 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1318,6 +1318,9 @@ fun void DelWordLeft=2335(,)
# 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(,)
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 77e74c75e..a7aff6109 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3933,6 +3933,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lPar
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 @@ int Editor::KeyCommand(unsigned int iMessage) {
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 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_ZOOMOUT:
case SCI_DELWORDLEFT:
case SCI_DELWORDRIGHT:
+ case SCI_DELWORDRIGHTEND:
case SCI_DELLINELEFT:
case SCI_DELLINERIGHT:
case SCI_LINECOPY: