Author Topic: Home key does not move to column one even if set to do so  (Read 6174 times)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2785
Home key does not move to column one even if set to do so
« on: February 01, 2012, 08:13:22 pm »
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.


Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Home key does not move to column one even if set to do so
« Reply #1 on: February 03, 2012, 05:48:16 pm »
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).

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2785
Re: Home key does not move to column one even if set to do so
« Reply #2 on: April 30, 2012, 08:43:33 pm »
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))

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
« Last Edit: April 30, 2012, 08:45:09 pm by Pecan »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Home key does not move to column one even if set to do so
« Reply #3 on: May 01, 2012, 11:18:44 am »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Home key does not move to column one even if set to do so
« Reply #4 on: May 01, 2012, 11:53:37 am »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Home key does not move to column one even if set to do so
« Reply #5 on: May 01, 2012, 01:16:42 pm »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ