See also: http://bugs.freepascal.org/view.php?id=11716 http://bugs.freepascal.org/view.php?id=11474
Sometimes Synedit moves the cursor around to perform replace, search or other operations, and in the end returns it to the original location, (or a new location that may have been visible before). - The flicker, repaints can be solved on there own (*not* the question/purpose of this mail) - But while the caret is set back to where it was => the topline/leftchar may have been modified, and that may not have been needed/wanted There are (at least) 2 approaches to solve this. (and maybe they should even go in parallel) Any opinions / other ideas are welcome. - Rewrite all code, never to move the caret => instead pass the desired => work location as arguments to functions/procedures - Use a similar approach like Emacs "save-excursion" This is like fPaintlock to painting, Just it would be fCaretLock. While active: - the Caret would not change thinks like topline/leftchar .... - the original position (before caret lock (can be recursive)) would be known (and if needed be used for displaying the caret [so we should *never* have a paint event in the middle of fCaretLock] - CaretUnlock restores the position Comments, please? Best Regards Martin _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus