comparison libgui/src/m-editor/find-dialog.cc @ 19566:b0ba6653305a gui-release

find_dialog: search from previous character position when searching backward (Bug #43917) * libgui/src/m-editor/find-dialog.cc (find_dialog::find): if search backward, use previous character position as start position.
author John Donoghue <john.donoghue@ieee.org>
date Sat, 03 Jan 2015 10:05:06 -0500
parents 521d4959fc42
children cbd5d36c5472 7bb80c927af5
comparison
equal deleted inserted replaced
19565:c2d01ed114ba 19566:b0ba6653305a
285 col = _edit_area->text (line).length () - 1; 285 col = _edit_area->text (line).length () - 1;
286 if (col == -1) 286 if (col == -1)
287 col = 0; 287 col = 0;
288 } 288 }
289 } 289 }
290 else if (! do_forward)
291 {
292 // search from previous character if search backward
293 int currpos = _edit_area->positionFromLineIndex(line,col);
294 if(currpos > 0) currpos --;
295 _edit_area->lineIndexFromPosition(currpos, &line,&col);
296 }
290 } 297 }
291 298
292 if (_edit_area) 299 if (_edit_area)
293 { 300 {
294 if (_edit_area->hasSelectedText () 301 if (_edit_area->hasSelectedText ()