Skip to content
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
006f465
Add ability to select single/multiple line(s) by clicking the line nu…
jenia90 Aug 23, 2025
759bba6
Move build.rs into its own directory (#623)
lhecker Aug 25, 2025
670a56d
Various minor improvements (#625)
lhecker Aug 25, 2025
554a6bc
Allow opening directories via the CLI (#577)
four-poetic-drew Aug 27, 2025
d42ae10
Replace vseq/vand with their immediate-form variants (#630)
heiher Aug 28, 2025
d3d5dd1
windows: fix the compatibility section of the manifest (#635)
DHowett Sep 5, 2025
dbda63b
sys/win: display a useful error message when SetConsoleMode fails (#639)
DHowett Sep 9, 2025
2c51581
Update Turkish translations (#655)
bitigchi Oct 13, 2025
95c1bad
Fix Rust nightly builds (#668)
lhecker Oct 14, 2025
87595e2
Add Vietnamese translations (#669)
miteigidesu Oct 17, 2025
71cbdd0
Add Portuguese (pt-PT) translations (#688)
OMouta Oct 31, 2025
abbff84
Move arena & helpers into their own crate (#694)
lhecker Dec 1, 2025
78adb81
i18n: Add Arabic translations (#634)
MKAbuMattar Dec 1, 2025
62be408
i18n: Add Estonian translations (#693)
mrFlamel Dec 1, 2025
033a674
Improve Korean translations (#663)
VenusGirl Dec 1, 2025
f467ba1
Fix multiple issues found under Linux (#706)
lhecker Dec 1, 2025
b998adb
Add Indonesian translation (#629)
viyic Dec 1, 2025
6c5d33c
Update man page for edit command to version 1.2.1 (#727)
polluks Jan 5, 2026
d0a63d1
Fix colors with Terminal.app's Clear Dark theme (#728)
lhecker Jan 5, 2026
5bafc16
Use platform line ending when opening single line files (#739)
UnnaturalTwilight Jan 13, 2026
e3a6f2d
Create parent directories when saving to a non-existent path (#738)
stescobedo92 Jan 20, 2026
10e93cb
Add proper multithreading support to Arena (#741)
lhecker Jan 20, 2026
cb14214
Add a JSON parser (#742)
lhecker Jan 20, 2026
f67627f
Add a glob matcher (#743)
lhecker Jan 22, 2026
5787514
Clean up error handling (#745)
lhecker Jan 23, 2026
1d20437
Fix the latest clippy warning (#751)
lhecker Jan 26, 2026
8286024
Fix warnings when building on macOS (#754)
lhecker Jan 27, 2026
a86afea
Merge branch 'main' into feature/583-select-lines-when-clicking
jenia90 Jan 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions crates/edit/src/tui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2314,6 +2314,46 @@ impl<'a> Context<'a, '_> {
}
}
}
// Clicking on the left margin (gutter) should select the whole line.
let margin_rect = Rect {
left: inner.left,
top: inner.top,
right: inner.left + tb.margin_width(),
bottom: inner.bottom,
};

if margin_rect.contains(self.tui.mouse_down_position) {
// If the user is dragging the mouse after pressing in the margin,
// update the selection to span from the initial click line to the current mouse line.
if self.tui.mouse_is_drag {
// Ensure there's a selection anchor at the original cursor position.
if !tb.has_selection() {
tb.start_selection();
}
let drag_pos = Point { x: 0, y: pos.y };
tb.selection_update_visual(drag_pos);
tc.preferred_column = tb.cursor_visual_pos().x;
make_cursor_visible = true;
} else {
// Single click: either extend selection (Shift) or select the clicked line.
let click_pos = pos;

if self.input_mouse_modifiers.contains(kbmod::SHIFT) {
tb.selection_update_visual(click_pos);
} else {
tb.cursor_move_to_visual(click_pos);
tb.select_line();
}

tc.preferred_column = tb.cursor_visual_pos().x;
make_cursor_visible = true;
}

// Consume input once and return.
self.set_input_consumed();
return make_cursor_visible;
}
}

self.set_input_consumed();
return make_cursor_visible;
Expand Down