Currently, if you are working on a line of text that is so long that it has been wrapped and you press the end key then the cursor goes to the end of the entire line rather than the end of the displayed lineBut that is just how it should be?
(home key does the same thing with start of the entire line rather than the start of the displayed line)A lot more complicated: It goes to the indent position, i.e. the first non-whitespace character. On the second "home", it goes to the beginning of the line. Yet another "home" makes it jump back to the indentation, very useful.
A lot more complicated: It goes to the indent position, i.e. the first non-whitespace character. On the second "home", it goes to the beginning of the line. Yet another "home" makes it jump back to the indentation, very useful.
But that is just how it should be?
Once a stable release is out, Yiannis' event scheduler will come into play... snip ...
especially since it is decided that key/menu/mouse handling will be superseded.
actually very few rich editing wrapping text controls exhibit this behavior. end key goes to the end of the displayed lineI have just tested the following 6 applications which all exhibit exactly this "wrong" behaviour:
no, nano, word and notepad implement home/end for wrapped text the way i want it to work
control->SetWrapMode(mgr->ReadBool(_T("/word_wrap"), false));
+ if(mgr->ReadBool(_T("/word_wrap_style_home_end"), true))
+ {
+ control->CmdKeyAssign(wxSCI_KEY_HOME,wxSCI_SCMOD_NULL,wxSCI_CMD_VCHOMEWRAP);
+ control->CmdKeyAssign(wxSCI_KEY_END,wxSCI_SCMOD_NULL,wxSCI_CMD_LINEENDWRAP);
+ control->CmdKeyAssign(wxSCI_KEY_HOME,wxSCI_SCMOD_SHIFT,wxSCI_CMD_VCHOMEWRAPEXTEND);
+ control->CmdKeyAssign(wxSCI_KEY_END,wxSCI_SCMOD_SHIFT,wxSCI_CMD_LINEENDWRAPEXTEND);
+ }
control->SetViewEOL(mgr->ReadBool(_T("/show_eol"), false));
A compiler/interpreter doesn't care if you word-wrap your sources. A new line starts after a newline char, nowhere else. Also, remember you can select words by double-click, and lines by triple-click, too. The way it is implemented is consistent with click-selecting (which is implemented as paragraph-select in Word, too.)
Think of less sophisticated languages like Python (or Basic?), or of .ini files, bash scripts, typical shell-style config files. You sure want to select a whole line if you mean to, not some random part that happens to be wrapped in a certain window at a certain time, or it can get very, very painful to track down later.
@dje: is there currently a keyboard shortcut to goto matching brace? I know scite uses ctrl+E and ctrl+shift+E, but notice that doesn't work in cb either.@dmoore