From 1e897e643d5acc133f9c90beeec20428d2037e41 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 22 Jul 2004 01:02:15 +0000 Subject: New method SCI_FINDCOLUMN. --- src/Document.cxx | 2 +- src/Editor.cxx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Document.cxx b/src/Document.cxx index 97abd6254..c06397fa8 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -653,7 +653,7 @@ int Document::FindColumn(int line, int column) { int position = LineStart(line); int columnCurrent = 0; if ((line >= 0) && (line < LinesTotal())) { - while (columnCurrent < column) { + while ((columnCurrent < column) && (position < Length())) { char ch = cb.CharAt(position); if (ch == '\t') { columnCurrent = NextTab(columnCurrent, tabInChars); diff --git a/src/Editor.cxx b/src/Editor.cxx index 81cf3bd47..3b16c9783 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6307,6 +6307,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_GETCOLUMN: return pdoc->GetColumn(wParam); + case SCI_FINDCOLUMN: + return pdoc->FindColumn(wParam, lParam); + case SCI_SETHSCROLLBAR : if (horizontalScrollBarVisible != (wParam != 0)) { horizontalScrollBarVisible = wParam != 0; -- cgit v1.2.3