News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Home key does not move to column one even if set to do so

Started by Pecan, February 01, 2012, 08:13:22 PM

Previous topic - Next topic

Pecan

There's an editor setting "Home key always moves caret to first column.
However, it acts the same for me whether the item is ticked or not.

It always move the caret to the first char on the line, then moves it to column 1 on the second key hit.

Is there a way to make the caret alway move to column 1?

This behavior holds for 10.5 through the latest svn.


Jenna

I found the reason for this issue.
It is caused by code related to word-wrp-settings.
The code is not correct also.
I will fix/enhance it and commit as soon as possible (most likely this weekend).

Pecan

cbeditor.cpp line 1364 queries a setting over which the user has no control. It arbitrarily sets word wrap home/end key styles to true.

This overrides the user setting of "Home key always moves caret to first colume". I believe the line should be corrected to:

if (mgr->ReadBool(_T("/word_wrap_style_home_end"), false))

or a setting placed in Editor setting dialog to control it.




svn build  rev 7950 (2012-04-29 13:51:10)   gcc 4.6.1 Windows/unicode - 32 bit

MortenMacFly

Quote from: Pecan on April 30, 2012, 08:43:33 PM
cbeditor.cpp line 1364 queries a setting over which the user has no control.
[...]
or a setting placed in Editor setting dialog to control it.
Implemented that in SVN. Good catch, Pecan!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on May 01, 2012, 11:18:44 AM
Quote from: Pecan on April 30, 2012, 08:43:33 PM
cbeditor.cpp line 1364 queries a setting over which the user has no control.
[...]
or a setting placed in Editor setting dialog to control it.
Implemented that in SVN. Good catch, Pecan!
I did not look at svn sources.
But if I remember correctly it's more complex, than just activate the "word_wrap_style_home_end"-stuff.
But I might be wrong.

MortenMacFly

Quote from: jens on May 01, 2012, 11:53:37 AM
But if I remember correctly it's more complex, than just activate the "word_wrap_style_home_end"-stuff.
Probably, but also, if we have a setting it should be configurable via UI. So it is not wrong to do it.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]