Simplify mouse left
This commit is contained in:
@@ -317,37 +317,11 @@ bool GlobalCommand(Event event) {
|
|||||||
caret.range.max = p;
|
caret.range.max = p;
|
||||||
caret.ifront = 1;
|
caret.ifront = 1;
|
||||||
}
|
}
|
||||||
} else if (event.clicks >= 2) {
|
} else if (event.clicks >= 2 && InBounds({caret.range.min - 1, caret.range.max + 1}, p)) {
|
||||||
view->carets.len = 1;
|
view->carets.len = 1;
|
||||||
|
|
||||||
// @todo: consider simplifying this, is enclosing a paren even useful?
|
|
||||||
// like it's pretty hard to actually hit with mouse...
|
|
||||||
if (InBounds({caret.range.min - 1, caret.range.max + 1}, p)) {
|
|
||||||
Range range = EncloseWord(buffer, p);
|
Range range = EncloseWord(buffer, p);
|
||||||
wchar_t scope = GetChar(buffer, p);
|
if (event.clicks >= 3) range = EncloseLoadWord(buffer, p);
|
||||||
if (!IsParen(scope) && !IsBrace(scope)) {
|
|
||||||
scope = GetChar(buffer, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsBrace(scope)) {
|
|
||||||
range = EncloseScope(buffer, p, '{', '}');
|
|
||||||
} else if (IsParen(scope)) {
|
|
||||||
range = EncloseScope(buffer, p, '(', ')');
|
|
||||||
} else {
|
|
||||||
if (event.clicks == 3) {
|
|
||||||
Range load_word_range = EncloseLoadWord(buffer, p);
|
|
||||||
if (AreEqual(load_word_range, range)) {
|
|
||||||
load_word_range = EncloseFullLine(buffer, p);
|
|
||||||
}
|
|
||||||
range = load_word_range;
|
|
||||||
}
|
|
||||||
if (event.clicks >= 4) range = EncloseFullLine(buffer, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
caret = MakeCaret(range.max, range.min);
|
caret = MakeCaret(range.max, range.min);
|
||||||
} else {
|
|
||||||
caret = MakeCaret(p);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
view->carets.len = 1;
|
view->carets.len = 1;
|
||||||
caret = MakeCaret(p);
|
caret = MakeCaret(p);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
- Remove pointers and use ViewIDs (enable array debug while doing this)
|
- Remove pointers and use ViewIDs (enable array debug while doing this)
|
||||||
- try using git grep for search for now, combine with fuzzy search buffer
|
- try using git grep for search for now, combine with fuzzy search buffer
|
||||||
- need to rewrite the path matching in lua
|
- lua maybe try heuristic matching paths from left?
|
||||||
- prevent lua from infinite looping
|
- prevent lua from infinite looping
|
||||||
- Append to console and change console directory
|
- Append to console and change console directory
|
||||||
- win32: change all stack buffers to arena
|
- win32: change all stack buffers to arena
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
- 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
|
||||||
- search backwards
|
- search backwards
|
||||||
- braces enclose should be performed even if we put the mouse out of bounds!
|
- braces enclose should be performed even if we put the mouse out of bounds!
|
||||||
- select until
|
|
||||||
- some split selection commands
|
- some split selection commands
|
||||||
- assign commands or lua functions to F1-F12 keys
|
- assign commands or lua functions to F1-F12 keys
|
||||||
|
|
||||||
@@ -47,6 +46,7 @@ BUG: there is a click hang when switching windows sometimes, you click after sel
|
|||||||
|
|
||||||
|
|
||||||
backlog
|
backlog
|
||||||
|
- expose a coroutine based scripting enviorment where user can execute shell commands wait for them and perform actions in very linear manner
|
||||||
- Test stdin writing code
|
- Test stdin writing code
|
||||||
- Implement shell interaction (last line should have a '$'' symbols, if you press enter it should send that line to stdin of a running shell)
|
- Implement shell interaction (last line should have a '$'' symbols, if you press enter it should send that line to stdin of a running shell)
|
||||||
- drop text into window
|
- drop text into window
|
||||||
|
|||||||
Reference in New Issue
Block a user