[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug #59419 - Patch
From: |
Benno Schulenberg |
Subject: |
Re: Bug #59419 - Patch |
Date: |
Fri, 6 Nov 2020 10:55:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
Op 05-11-2020 om 22:32 schreef Ava:
> I noticed a bug this morning in nano that caused it to segfault if the linter
> put
> the cursor out of bounds and the user began typing outside of the boundaries
> of
> the current document, as can very easily happen if using jshint and indenting
> with tabs. Attached, I have packed a patch to fix this bug.
Thanks for the patch (and for https://savannah.gnu.org/bugs/?59419, the report).
The patch, however, is not a good fix. If the linter specifies an index that
is beyond the length of the line, we still want to put the cursor on that line,
not just report an out-of-bounds index. An out-of-bounds line number should
not occur at all, but if it would occur, it would not lead to a segfault, but
would just put the cursor on the last line of the buffer.
So, I have fixed the issue with this simpler change instead:
https://git.savannah.gnu.org/cgit/nano.git/commit/?id=7f184ee2
Benno
signature.asc
Description: OpenPGP digital signature