aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2001-11-08 00:29:33 +0000
committernyamatongwe <unknown>2001-11-08 00:29:33 +0000
commit4618be21c0ec2e5af65dc3d6dd3263b88ef9d628 (patch)
tree44fa308a79139cc84491c744dad914ff1f8a5f17
parentf23b95b9e9cd32dcfb69b8f949856e8ba98b9398 (diff)
downloadscintilla-mirror-4618be21c0ec2e5af65dc3d6dd3263b88ef9d628.tar.gz
Added methods for finding the start and end of words.
-rw-r--r--include/Scintilla.h2
-rw-r--r--include/Scintilla.iface6
-rw-r--r--src/Editor.cxx6
3 files changed, 14 insertions, 0 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index fc6369ee4..ceb7cc7e4 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -342,6 +342,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_TIME_FOREVER 10000000
#define SCI_SETMOUSEDWELLTIME 2264
#define SCI_GETMOUSEDWELLTIME 2265
+#define SCI_WORDSTARTPOSITION 2266
+#define SCI_WORDENDPOSITION 2267
#define SCI_LINEDOWN 2300
#define SCI_LINEDOWNEXTEND 2301
#define SCI_LINEUP 2302
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 0a3c98e68..f6d360fc6 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -890,6 +890,12 @@ set void SetMouseDwellTime=2264(int periodMilliseconds,)
# Retrieve the time the mouse must sit still to generate a mouse dwell event
get int GetMouseDwellTime=2265(,)
+# Get position of start of word
+fun int WordStartPosition=2266(position pos,)
+
+# Get position of end of word
+fun int WordEndPosition=2267(position pos,)
+
## Start of key messages
# Move caret down one line.
fun void LineDown=2300(,)
diff --git a/src/Editor.cxx b/src/Editor.cxx
index ce56ee8b5..254a99736 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4107,6 +4107,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {
case SCI_GETMOUSEDWELLTIME:
return dwellDelay;
+ case SCI_WORDSTARTPOSITION:
+ return pdoc->ExtendWordSelect(wParam, -1);
+
+ case SCI_WORDENDPOSITION:
+ return pdoc->ExtendWordSelect(wParam, 1);
+
case SCI_GETCOLUMN:
return pdoc->GetColumn(wParam);