Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » [Solved] CodeEditor: press BACKSPACE (and DELETE) key twice in order to remove one char.
Re: [BUG #1858, + PATCH] CodeEditor: press BACKSPACE (and DELETE) key twice in order to remove one char. [message #49749 is a reply to message #49691] Fri, 20 April 2018 13:27 Go to previous message
omari is currently offline  omari
Messages: 266
Registered: March 2010
Experienced Member
after more research, I find that the real source of the problem is the triggering of a MouseMove event while the mouse left button is down.

so to reproduce the problem in theide:
Mouse :
- LeftDown : clicks somewhere in the text
- MouseMove : makes a lettle mouse move in order to raise a MouseMove event, but without selection
- LeftUp : releases the button.

Keyboard:
- press the key BACKSPACE (or DELETE)

==> the key pressed do nothing,


after analyzing LineEdit :: MouseMove:
void LineEdit::MouseMove(Point p, dword flags) {
	if((flags & K_MOUSELEFT) && HasFocus() && HasCapture()) {
		int64 c = GetMousePos(p);
		dorectsel = flags & K_ALT;
		PlaceCaret(c, mpos != c || HasCapture());                  // <<-----
		dorectsel = false;
	}
}


I notice that the line
 PlaceCaret(c, mpos != c || HasCapture());  

is equivalent to
 PlaceCaret(c, true); 
because if HasCapture() is false, the condition
if((flags & K_MOUSELEFT) && HasFocus() && HasCapture())
is false too.

then i think, this line shell be

 PlaceCaret(c, mpos != c );  

which solves the bug


regards
omari.
 
Read Message
Read Message
Previous Topic: what about *.ini highlighter?
Next Topic: simple bug?
Goto Forum:
  


Current Time: Thu May 09 05:04:17 CEST 2024

Total time taken to generate the page: 0.02432 seconds