Bug #11234 2007-06-02 16:44

cmb

Home Key Doesn't Move Cursor Home

In the editor the Home key does not function correctly. When I hit Home the cursor should move to the beginning of the line. If the line contains leading spaces (indentation) the cursor moves to the position after the leading spaces. I have to hit Home again to go to real beginning of the line. If there is no indentation the Home key works correctly.

One of the cases where this behavior is a problem appears when I want to copy an entire line. My cursor may be anywhere on the line so I hit the Home key to move the cursor to the beginning of the line to prepare for the copy. Then I'll hold the shift key down and hit the down arrow key once to highlight the line including the line ending characters. With the present behavior if the line has indentation I may pick up extraneous characters on the line below.

At the minimum there should be a setting in Settings > Editor > General Settings to disable this behavior.

Version: SVN 3989 running under Windows XP.

Chuck

Category
Application::Editor
Group
 
Status
Closed
Close date
2007-07-18 14:20
Assigned to
rickg22
pauliusz 2007-06-03 21:06

This is "default" behavior of almost all source code editors... but I agree that there should be possibility to change this behavior.

cmb 2007-06-03 21:31

I come from the world of Dev-C++ and Borland Turbo C++ 2006 (C++ Builder) so my experience is limited. Neither of those editors exhibit this behavior.

Chuck

biplab 2007-06-04 17:01

As others have commented, it's the default behaviour for most of the modern editors. C::B uses Scintilla and this behaviour is defined by Scintilla. I'm doubtful whether this can be defined as a C::B bug.

pauliusz 2007-06-06 22:34

I think I can implement this feature... Can someone suggest me how I should name this checkbox in editor setting?

cmb 2007-06-06 22:54

I came up with two admittedly verbose possibilities:

Home key always moves caret to first column.

or

Home key moves caret to the first non-white space character.

pauliusz 2007-06-06 23:47
rickg22 2007-07-18 14:20

Applied patch #2040. Bug fixed.