Mercurial > hg > octave-lyh
changeset 16387:f3c93e387865
gui: recenter the line in the editor where the debugger stopped
* file-editor-tab.cc(set_debugger_position): scroll the widget of the editor
widget such that the line where the debugger stopped is centered
author | Torsten <ttl@justmail.de> |
---|---|
date | Thu, 28 Mar 2013 12:02:30 +0100 |
parents | 4902484f9181 |
children | 75a6716b72a2 |
files | libgui/src/m-editor/file-editor-tab.cc |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -1156,6 +1156,11 @@ if (line > 0) { _edit_area->markerAdd (line, debugger_position); + int first_line = _edit_area->firstVisibleLine (); + long int visible_lines = _edit_area->SendScintilla + (QsciScintillaBase::SCI_LINESONSCREEN); + first_line = first_line + (line - first_line - visible_lines/2); + _edit_area->setFirstVisibleLine (first_line); } }