Skip to content

Commit c9b4e1f

Browse files
committed
- adapted Scintilla.iface to fix description of GetSelectionHidden by adding missing space
- added new SCN_UPDATEUI position info
1 parent 95b1cc8 commit c9b4e1f

6 files changed

Lines changed: 6 additions & 5 deletions

File tree

PythonScript/src/Scintilla.iface

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ fun position GetTextRangeFull=2039(, textrangefull tr)
14101410
# Draw the selection either highlighted or in normal (non-highlighted) style.
14111411
fun void HideSelection=2163(bool hide,)
14121412

1413-
#Is the selection visible or hidden?
1413+
# Is the selection visible or hidden?
14141414
get bool GetSelectionHidden=2088(,)
14151415

14161416
# Retrieve the x value of the point in the window where a position is displayed.

PythonScript/src/ScintillaPython.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ BOOST_PYTHON_MODULE(Npp)
394394
.def("getSelText", &ScintillaWrapper::GetSelText, "Retrieve the selected text.\nReturn the length of the text.\nResult is NUL-terminated.")
395395
.def("getTextRangeFull", &ScintillaWrapper::GetTextRangeFull, boost::python::args("start", "end"), "Retrieve a range of text that can be past 2GB.\nReturn the length of the text.")
396396
.def("hideSelection", &ScintillaWrapper::HideSelection, boost::python::args("hide"), "Draw the selection either highlighted or in normal (non-highlighted) style.")
397-
.def("getSelectionHidden", &ScintillaWrapper::GetSelectionHidden, "")
397+
.def("getSelectionHidden", &ScintillaWrapper::GetSelectionHidden, "Is the selection visible or hidden?")
398398
.def("pointXFromPosition", &ScintillaWrapper::PointXFromPosition, boost::python::args("pos"), "Retrieve the x value of the point in the window where a position is displayed.")
399399
.def("pointYFromPosition", &ScintillaWrapper::PointYFromPosition, boost::python::args("pos"), "Retrieve the y value of the point in the window where a position is displayed.")
400400
.def("lineFromPosition", &ScintillaWrapper::LineFromPosition, boost::python::args("pos"), "Retrieve the line containing a position.")

PythonScript/src/ScintillaWrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ void ScintillaWrapper::notify(SCNotification *notifyCode)
132132
break;
133133

134134
case SCN_UPDATEUI:
135+
params["position"] = notifyCode->position;
135136
params["updated"] = notifyCode->updated;
136137
break;
137138

PythonScript/src/ScintillaWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ class ScintillaWrapper : public PyProducerConsumer<CallbackExecArgs>
13201320
*/
13211321
void HideSelection(bool hide);
13221322

1323-
/**
1323+
/** Is the selection visible or hidden?
13241324
*/
13251325
bool GetSelectionHidden();
13261326

PythonScript/src/ScintillaWrapperGenerated.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2475,7 +2475,7 @@ void ScintillaWrapper::HideSelection(bool hide)
24752475
callScintilla(SCI_HIDESELECTION, hide);
24762476
}
24772477

2478-
/**
2478+
/** Is the selection visible or hidden?
24792479
*/
24802480
bool ScintillaWrapper::GetSelectionHidden()
24812481
{

docs/source/scintilla.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,7 @@ Scintilla Methods
18101810

18111811
.. method:: editor.getSelectionHidden() -> bool
18121812

1813-
1813+
Is the selection visible or hidden?
18141814

18151815
See Scintilla documentation for `SCI_GETSELECTIONHIDDEN <https://www.scintilla.org/ScintillaDoc.html#SCI_GETSELECTIONHIDDEN>`_
18161816

0 commit comments

Comments
 (0)