nano

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

commit 15959346fb92d5e62b643a944edcc4988a9076fe
parent 902b4674f990e2b5171f78e4e73e0c6c90fc3b6f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Thu, 14 Mar 2019 19:32:10 +0100

tweaks: exclude the guide-stripe code from the tiny version

The option is not available, so including the code is pointless.

Diffstat:
Msrc/global.c | 2++
Msrc/nano.c | 2++
Msrc/proto.h | 2++
Msrc/winio.c | 2+-
4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/global.c b/src/global.c @@ -111,8 +111,10 @@ int editwincols = -1; /* The number of usable columns in the edit window: COLS - margin. */ int margin = 0; /* The amount of space reserved at the left for line numbers. */ +#ifndef NANO_TINY ssize_t stripe_column = 0; /* The column at which a vertical bar will be drawn. */ +#endif filestruct *cutbuffer = NULL; /* The buffer where we store cut text. */ diff --git a/src/nano.c b/src/nano.c @@ -2137,6 +2137,7 @@ int main(int argc, char **argv) ignore_rcfiles = TRUE; break; #endif +#ifndef NANO_TINY case 'J': if (!parse_num(optarg, &stripe_column) || stripe_column <= 0) { fprintf(stderr, _("Guide column \"%s\" is invalid"), optarg); @@ -2144,6 +2145,7 @@ int main(int argc, char **argv) exit(1); } break; +#endif case 'K': SET(RAW_SEQUENCES); break; diff --git a/src/proto.h b/src/proto.h @@ -88,7 +88,9 @@ extern WINDOW *bottomwin; extern int editwinrows; extern int editwincols; extern int margin; +#ifndef NANO_TINY extern ssize_t stripe_column; +#endif extern filestruct *cutbuffer; extern filestruct *cutbottom; diff --git a/src/winio.c b/src/winio.c @@ -2685,6 +2685,7 @@ void edit_draw(filestruct *fileptr, const char *converted, } #endif /* ENABLE_COLOR */ +#ifndef NANO_TINY if (stripe_column > from_col && !inhelp) { const ssize_t target_column = stripe_column - from_col - 1; const char *text = converted + actual_x(converted, target_column); @@ -2695,7 +2696,6 @@ void edit_draw(filestruct *fileptr, const char *converted, wattroff(edit, interface_color_pair[GUIDE_STRIPE]); } -#ifndef NANO_TINY /* If the mark is on, and fileptr is at least partially selected, we * need to paint it. */ if (openfile->mark &&