User forums > Using Code::Blocks

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

(1/2) > >>

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:


--- Code: ---if (mgr->ReadBool(_T("/word_wrap_style_home_end"), false))
--- End code ---

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.

--- End quote ---
Implemented that in SVN. Good catch, Pecan!

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.

--- End quote ---
Implemented that in SVN. Good catch, Pecan!

--- End quote ---
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.

Navigation

[0] Message Index

[#] Next page

Go to full version