Shift Mouse Press works now

This commit is contained in:
Krzosa Karol
2024-08-02 21:38:12 +02:00
parent 4f12887a91
commit f3059ec8ea
2 changed files with 4 additions and 2 deletions

View File

@@ -567,7 +567,10 @@ void WindowCommand(Event event, Window *window, View *view) {
XY xy = {(Int)(pos.x), (Int)(pos.y)};
Int p = XYToPosWithoutNL(*buffer, xy);
if (mouse_in_document && Mouse(LEFT) && event.mouse_double_click) {
if (mouse_in_document && Mouse(LEFT) && event.shift) {
Caret *c = &view->carets[0];
*c = ChangeFront(*c, p);
} else if (mouse_in_document && Mouse(LEFT) && event.mouse_double_click) {
Caret *c = &view->carets[0];
if (InBounds({c->range.min - 1, c->range.max + 1}, p)) {
c->range = EncloseWord(*buffer, p);

View File

@@ -9,7 +9,6 @@
- I think the way sublime text and we display line highlights is confusing with multiple cursors (line highlight can be confused with selection)
- commands:
- indent selected lines
- trim whitespace
- Ctrl + G should select the line number in bar
- How to make search into bar?