Home + left stops at indent
This commit is contained in:
@@ -400,10 +400,11 @@ Int GetLineIndent(Buffer *buffer, Int line) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// string = TrimEnd(string);
|
|
||||||
// if (EndsWith(string, L"{")) indent += StyleIndentSize;
|
|
||||||
// if (EndsWith(string, L"(")) indent += StyleIndentSize;
|
|
||||||
|
|
||||||
return indent;
|
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) {
|
if (direction == DIR_RIGHT) {
|
||||||
pos = GetLineEnd(buffer, pos);
|
pos = GetLineEnd(buffer, pos);
|
||||||
} else {
|
} 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) {
|
if (shift) {
|
||||||
|
|||||||
@@ -4,14 +4,9 @@
|
|||||||
|
|
||||||
- switch to previous view (ctrl + tab)
|
- 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)
|
- 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
|
- 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
|
- should be able click on title bar of windows which disappear on losing focus
|
||||||
- search backwards
|
- 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
|
- 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
|
- search as a command to execute which is going to be in the title bar
|
||||||
- Ctrl + G should select the line number in bar
|
- Ctrl + G should select the line number in bar
|
||||||
|
|||||||
Reference in New Issue
Block a user