Home + left stops at indent
This commit is contained in:
@@ -400,10 +400,11 @@ Int GetLineIndent(Buffer *buffer, Int line) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// string = TrimEnd(string);
|
||||
// if (EndsWith(string, L"{")) indent += StyleIndentSize;
|
||||
// if (EndsWith(string, L"(")) indent += StyleIndentSize;
|
||||
|
||||
return indent;
|
||||
}
|
||||
|
||||
Int GetIndentAtPos(Buffer *buffer, Int pos) {
|
||||
Int line = PosToLine(*buffer, pos);
|
||||
Int result = GetLineIndent(buffer, line);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,13 @@ void Command_MoveCursorsToSide(View *view, int direction, bool shift = false) {
|
||||
if (direction == DIR_RIGHT) {
|
||||
pos = GetLineEnd(buffer, pos);
|
||||
} else {
|
||||
pos = GetLineStart(buffer, pos);
|
||||
Int indent = GetIndentAtPos(buffer, pos);
|
||||
Int new_pos = GetLineStart(buffer, pos);
|
||||
if (new_pos + indent != pos) {
|
||||
pos = new_pos + indent;
|
||||
} else {
|
||||
pos = new_pos;
|
||||
}
|
||||
}
|
||||
|
||||
if (shift) {
|
||||
|
||||
@@ -4,14 +4,9 @@
|
||||
|
||||
- switch to previous view (ctrl + tab)
|
||||
- save location on open and allow for revert (buffer id? or buffer name? - buffer name can change, buffer id is harder to serialize, I guess if internal only then buffer id)
|
||||
- delete till indent
|
||||
- indent on enter
|
||||
- click 3 times to select line
|
||||
- we could rewrite kill lines with simpler commands - extend selection to encompass lines->replace
|
||||
- improve cursor movement, it's too clunky, too much stopping
|
||||
- should be able click on title bar of windows which disappear on losing focus
|
||||
- search backwards
|
||||
- load selected string or auto enclosed word when midclick?, ctrl + click, ctrl + e?
|
||||
- experiment with using multiple cursors to select command and it's input
|
||||
- search as a command to execute which is going to be in the title bar
|
||||
- Ctrl + G should select the line number in bar
|
||||
|
||||
Reference in New Issue
Block a user