nano

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

commit 803379c52c1fb3f4cc71018f9733591af53b2a97
parent 4522ca2d1b10f7b6190f9acd166abeebe08917bd
Author: Chris Allegretta <chrisa@asty.org>
Date:   Sat,  7 Feb 2009 07:09:31 +0000

Add shortcut for CBEGINBEFORE case to edit_draw()
Added bug 80 to document segfault when editing near COLS



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

Diffstat:
MBUGS | 4+++-
Msrc/winio.c | 6++++++
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/BUGS b/BUGS @@ -1,6 +1,7 @@ ** Open BUGS ** - Cutting the line at the top of the screen recenters to center (71) -- Many menu items are probably missing from the new backend (73) +- Segfault editing at COLS presumably due to new color syntax + highlighting (80) ** Fixed BUGS ** - Marked cutting sometimes leaves a newline in the file unintelligently, @@ -143,6 +144,7 @@ - Trying to insert a file of 0 bytes will hang nano (70) [FIXED]. - Meta-space and ^Space are not yet handled in new backend code (77) [FIXED] - F-keys do not work with new shortcut backend (72) [FIXED] +- Many menu items are probably missing from the new backend (73) [FIXED] - Need a 'check-vitals-mapped' function to check that the end used didn't unbind all the keys for exit or cancel before starting up the editor (74) [FIXED] - Browser and prompt code still implement old switch on raw key input instead diff --git a/src/winio.c b/src/winio.c @@ -2577,6 +2577,12 @@ void edit_draw(filestruct *fileptr, const char *converted, int else if (md == CWHOLELINE) { mvwaddnstr(edit, line, 0, converted, -1); continue; + } else if (md == CBEGINBEFORE) { + regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0); + paintlen = actual_x(converted, strnlenpt(fileptr->data, + endmatch.rm_eo) - start); + mvwaddnstr(edit, line, 0, converted, paintlen); + continue; } while (start_line != NULL && regexec(tmpcolor->start,