From 15959346fb92d5e62b643a944edcc4988a9076fe Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Thu, 14 Mar 2019 19:32:10 +0100 Subject: [PATCH] tweaks: exclude the guide-stripe code from the tiny version The option is not available, so including the code is pointless. --- src/global.c | 2 ++ src/nano.c | 2 ++ src/proto.h | 2 ++ src/winio.c | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/global.c b/src/global.c index 09cbf54f..18cf3a1b 100644 --- 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 index ed5ee18f..15492dcf 100644 --- 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 index a24e7117..e77dc16b 100644 --- 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 index 26bca2d6..a36a3d3b 100644 --- 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 &&