diff options
| author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-02-14 06:34:29 +0100 |
|---|---|---|
| committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-02-14 06:34:29 +0100 |
| commit | a65c538fcfecafcefed34078e7671bc4ea6ed1ec (patch) | |
| tree | 6df691abb2bad9779a5a49cde315a403dfcbf6a2 | |
| parent | 7ee0f45178da25c2746ca1d065653a0b6a27078d (diff) | |
| download | scintilla-mirror-sciteco-v0.6.4.tar.gz | |
fixed tab stop calculation on Cursessciteco-v0.6.4
* 2 was added to the current X position before calculating
the next tab stop. On non-Curses platforms this did not hurt since
the X position is in pixels. On Curses, the "width" of each character
is 1.
* I don't know whether this change has any effect on the other
(non-curses) platforms.
The algorithm was similar since the very beginning of Scintilla
(initial commit), so no explanation is given in the commit log.
| -rw-r--r-- | src/EditView.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/EditView.cxx b/src/EditView.cxx index 4976d3614..1ff0b695d 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -220,10 +220,10 @@ void EditView::ClearAllTabstops() { } XYPOSITION EditView::NextTabstopPos(int line, XYPOSITION x, XYPOSITION tabWidth) const { - int next = GetNextTabstop(line, static_cast<int>(x + 2)); + int next = GetNextTabstop(line, static_cast<int>(x)); if (next > 0) return static_cast<XYPOSITION>(next); - return (static_cast<int>((x + 2) / tabWidth) + 1) * tabWidth; + return (static_cast<int>(x / tabWidth) + 1) * tabWidth; } bool EditView::ClearTabstops(int line) { |
