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.
[Solved] CodeEditor: press BACKSPACE (and DELETE) key twice in order to remove one char. [message #49691] Wed, 04 April 2018 13:31 Go to previous message
omari is currently offline  omari
Messages: 265
Registered: March 2010
Experienced Member
in TheIDE, Whenever I delete a character, I have to visually check if the character has delete, otherwise, I retype the delete key.

after investigation, i found the solution here:

bool   TextCtrl::RemoveSelection() {
	int64 l, h;
	if(anchor < 0) return false;
	if(IsRectSelection())
		l = RemoveRectSelection();
	else {
		GetSelection(l, h);
		if(l == h) return false;     <--- Add this line
		Remove((int)l, int(h - l));
	}
	anchor = -1;
	Refresh();
	PlaceCaret(l);
	Action();
	return true;
}


when there is no selection, GetSelection set l and h to same value
then RemoveSelection() shall return false.

Adding the line
if(l == h) return false;
seem to resolve the problem.


regards
omari.

[Updated on: Sat, 11 January 2020 23:02]

Report message to a moderator

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


Current Time: Sat Apr 27 13:43:03 CEST 2024

Total time taken to generate the page: 0.05260 seconds