Menu

#3 CText: Re-write the findCursorInLine family

open
Rendering (3)
5
2008-10-26
2008-10-26
No

The findCursorInLine currently tries to do too much and is a big mess.
Should re-write it and have the findCursorForward and findCursorBackwards
do more.

findCursorForward/Backwards should determine if a failed find consists in a
"cursor is at the end/beginning". This is currently handled by
findCursorInLine.

Additionnally, findCursorForward/Backwards should revert to a full search
if the cursor isn't found and can't be proven to be at the end/beginning.
May want to query the CText directly to determine if the cursor is really
at the end or if we called the wrong direction.

Once this fix is made, change the CTextLineBuffer::backspace to not
decrement the cursor line and call findCursorForward, but instead simply
call findCursorBackwards.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.