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: Other Features Wishlist and/or Bugs » tabs settings in editor not honoured
Re: tabs settings in editor not honoured [message #26746 is a reply to message #26183] Tue, 25 May 2010 15:07 Go to previous messageGo to previous message
frankdeprins is currently offline  frankdeprins
Messages: 99
Registered: September 2008
Location: Antwerp - Belgium
Member
Sorry for the late reply; I did not return to this thread anymore.
Here is the patch I apply:
Index: .\uppsrc\CodeEditor\CodeEditor.cpp
=========================================================
--- .\uppsrc\CodeEditor\CodeEditor.cpp	Tue Feb 09 16:34:06 2010
+++ ..\Modified\uppsrc\CodeEditor\CodeEditor.cpp	Thu Mar 04 11:53:04 2010
@@ -868,8 +868,11 @@
 			IndentInsert(code);
 			return true;
 		}
-		if(code == 9 && IsSelection())
+		if(code == 9)
+			if (IsSelection())
 			    return true;
+			else if (indent_spaces)
+   			return LineEdit::Key(32, indent_amount);
 	}
 	if(GetCharset() != CHARSET_UTF8)
 		if(code >= 128 && code < 65536 && FromUnicode((wchar)code, GetCharset()) == DEFAULTCHAR)

This patch does not change the package specific character of the setting. What it does is change the behaviour of the tab key: if you have set 'indent using spaces' on, the tab key will also use spaces when pressed instead of a tab character. Unless for a selection.
Beware that I am quite new in investigating the U++ sources and I would not recommend applying this patch to the repository without a proper review. That said, it works fine for me.

Here is another one that sets 'indent using spaces' as default as well as a space count of 3 for indents. This is how I like it, please edit as you want it.

Index: .\uppsrc\ide\idewin.cpp
=========================================================
--- .\uppsrc\ide\idewin.cpp	Mon Feb 22 09:31:30 2010
+++ ..\Modified\uppsrc\ide\idewin.cpp	Thu Mar 04 10:31:35 2010
@@ -530,9 +530,9 @@

 	tfont = editorfont = font2 = Courier(13);
 	veditorfont = consolefont = font1 = Courier(11);
-	editortabsize = 4;
-	indent_amount = 4;
-	indent_spaces = false;
+	editortabsize = 3;
+	indent_amount = 3;
+	indent_spaces = true;
 	show_status_bar = false;
 	show_tabs = false;
 	tabs_icons = false;

[Updated on: Tue, 25 May 2010 16:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Color of selection: filebar, assist, package selections...
Next Topic: Menu losing 'focus' when building?
Goto Forum:
  


Current Time: Thu May 16 01:20:37 CEST 2024

Total time taken to generate the page: 0.02293 seconds