diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2016-11-05 20:32:17 +1100 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2016-11-05 20:32:17 +1100 |
commit | 8a62263409f5d222ac0d0ccf7bf0e7e0261224a8 (patch) | |
tree | 2fa3fea045c228d40e8a812b8553afd21f7f168a /src/Editor.cxx | |
parent | 1e36c7e89248cf5f9e4353673918e79cfcaeb857 (diff) | |
download | scintilla-mirror-8a62263409f5d222ac0d0ccf7bf0e7e0261224a8.tar.gz |
Add options to choose between the locations of a position when there
are multiple locations for one position.
The main current use is to find the location at the end of a line or display
line when the commonly used location is at the start of the next line.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 62bc60a09..6950ac66e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -363,14 +363,14 @@ SelectionPosition Editor::ClampPositionIntoDocument(SelectionPosition sp) const } } -Point Editor::LocationFromPosition(SelectionPosition pos) { +Point Editor::LocationFromPosition(SelectionPosition pos, PointEnd pe) { RefreshStyleData(); AutoSurface surface(this); - return view.LocationFromPosition(surface, *this, pos, topLine, vs); + return view.LocationFromPosition(surface, *this, pos, topLine, vs, pe); } -Point Editor::LocationFromPosition(int pos) { - return LocationFromPosition(SelectionPosition(pos)); +Point Editor::LocationFromPosition(int pos, PointEnd pe) { + return LocationFromPosition(SelectionPosition(pos), pe); } int Editor::XFromPosition(int pos) { @@ -3150,6 +3150,12 @@ void Editor::ParaUpOrDown(int direction, Selection::selTypes selt) { } while (!cs.GetVisible(lineDoc)); } +Range Editor::RangeDisplayLine(int lineVisible) { + RefreshStyleData(); + AutoSurface surface(this); + return view.RangeDisplayLine(surface, *this, lineVisible, vs); +} + int Editor::StartEndDisplayLine(int pos, bool start) { RefreshStyleData(); AutoSurface surface(this); |