nano

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

commit d49c267f91ef5f37de056c9d5e621f0b306a9c90
parent 2e121fa08c9dae90588c554967d15b2f2e6eb53f
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Sun, 14 Jun 2015 17:56:44 +0000

Skipping to the next step when a found start has been qualified as
an end earlier.  This helps with Python's triple-quoted strings.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5247 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 3+++
Msrc/winio.c | 6++++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,6 +1,9 @@ 2015-06-14 Benno Schulenberg <bensberg@justemail.net> * src/winio.c (edit_draw): Add some debugging code to track which multidata codes (for multiline regexes) get assigned to which lines. + * src/winio.c (edit_draw): Start and end regexes can be very similar; + so if a found start has been qualified as an end earlier, believe it + and skip to the next step. This helps with Python's docstrings. 2015-06-11 Benno Schulenberg <bensberg@justemail.net> * src/winio.c (get_key_buffer): Add some debugging code to make it diff --git a/src/winio.c b/src/winio.c @@ -2600,6 +2600,12 @@ void edit_draw(filestruct *fileptr, const char *converted, int start_line = start_line->prev; } + /* If the found start has been qualified as an end earlier, + * believe it and skip to the next step. */ + if (start_line != NULL && + start_line->multidata[tmpcolor->id] == CBEGINBEFORE) + goto step_two; + /* Skip over a zero-length regex match. */ if (startmatch.rm_so == startmatch.rm_eo) startmatch.rm_eo++;