nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f2bfa53b613eef378e92be3bff7cd71382e473ed
parent 25d07b422d4f5d9bdbe3ec9b42c6820235b3a209
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 30 Mar 2024 11:44:18 +0100

tweaks: elide a redundant variable

Diffstat:
Msrc/nano.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -1339,7 +1339,6 @@ int do_mouse(void) size_t leftedge; #ifndef NANO_TINY size_t current_x_save = openfile->current_x; - bool sameline = (click_row == openfile->cursor_row); if (ISSET(SOFTWRAP)) leftedge = leftedge_for(xplustabs(), openfile->current); @@ -1359,7 +1358,7 @@ int do_mouse(void) #ifndef NANO_TINY /* Clicking where the cursor is toggles the mark, as does clicking * beyond the line length with the cursor at the end of the line. */ - if (sameline && openfile->current_x == current_x_save) { + if (row_count == 0 && openfile->current_x == current_x_save) { do_mark(); if (ISSET(STATEFLAGS)) titlebar(NULL);