diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_cmds.c | 9 | ||||
-rw-r--r-- | src/nvim/os_unix.c | 12 | ||||
-rw-r--r-- | src/nvim/os_unix_defs.h | 10 | ||||
-rw-r--r-- | src/nvim/term.c | 4 |
4 files changed, 16 insertions, 19 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 556e0c01e3..0829049e4d 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3602,8 +3602,13 @@ void do_sub(exarg_T *eap) eap->flags = EXFLAG_PRINT; } - do_join(eap->line2 - eap->line1 + 1, FALSE, TRUE, FALSE, true); - sub_nlines = sub_nsubs = eap->line2 - eap->line1 + 1; + linenr_T joined_lines_count = eap->line2 < curbuf->b_ml.ml_line_count + ? eap->line2 - eap->line1 + 2 + : eap->line2 - eap->line1 + 1; + if (joined_lines_count >= 2) { + do_join(joined_lines_count, FALSE, TRUE, FALSE, true); + } + sub_nlines = sub_nsubs = joined_lines_count - 1; do_sub_msg(false); ex_may_print(eap); diff --git a/src/nvim/os_unix.c b/src/nvim/os_unix.c index e761145f6f..8784559b50 100644 --- a/src/nvim/os_unix.c +++ b/src/nvim/os_unix.c @@ -1,6 +1,5 @@ /* * VIM - Vi IMproved by Bram Moolenaar - * OS/2 port by Paul Slootman * VMS merge by Zoltan Arpadffy * * Do ":help uganda" in Vim to read copying and usage conditions. @@ -10,7 +9,7 @@ /* * os_unix.c -- code for all flavors of Unix (BSD, SYSV, SVR4, POSIX, ...) - * Also for BeOS and Atari MiNT. + * Also for BeOS * * A lot of this file was originally written by Juergen Weigert and later * changed beyond recognition. @@ -524,9 +523,8 @@ void mch_settmode(int tmode) { static int first = TRUE; - /* Why is NeXT excluded here (and not in os_unixx.h)? */ #if defined(ECHOE) && defined(ICANON) && (defined(HAVE_TERMIO_H) || \ - defined(HAVE_TERMIOS_H)) && !defined(__NeXT__) + defined(HAVE_TERMIOS_H)) /* * for "new" tty systems */ @@ -554,9 +552,8 @@ void mch_settmode(int tmode) */ tnew.c_iflag &= ~ICRNL; tnew.c_lflag &= ~(ICANON | ECHO | ISIG | ECHOE -# if defined(IEXTEN) && !defined(__MINT__) +# if defined(IEXTEN) | IEXTEN /* IEXTEN enables typing ^V on SOLARIS */ - /* but it breaks function keys on MINT */ # endif ); # ifdef ONLCR /* don't map NL -> CR NL, we do it ourselves */ @@ -622,9 +619,8 @@ void get_stty(void) char_u buf[2]; char_u *p; - /* Why is NeXT excluded here (and not in os_unixx.h)? */ #if defined(ECHOE) && defined(ICANON) && (defined(HAVE_TERMIO_H) || \ - defined(HAVE_TERMIOS_H)) && !defined(__NeXT__) + defined(HAVE_TERMIOS_H)) /* for "new" tty systems */ # ifdef HAVE_TERMIOS_H struct termios keys; diff --git a/src/nvim/os_unix_defs.h b/src/nvim/os_unix_defs.h index 2a44ec3412..ebea86ebcf 100644 --- a/src/nvim/os_unix_defs.h +++ b/src/nvim/os_unix_defs.h @@ -8,17 +8,13 @@ * Do ":help credits" in Vim to see a list of people who contributed. */ -/* - * NextStep has a problem with configure, undefine a few things: - */ - #include <stdio.h> #include <ctype.h> -# include <sys/types.h> -# include <sys/stat.h> +#include <sys/types.h> +#include <sys/stat.h> -# include <stdlib.h> +#include <stdlib.h> #ifdef HAVE_UNISTD_H # include <unistd.h> diff --git a/src/nvim/term.c b/src/nvim/term.c index fd2988c850..9da7e11b96 100644 --- a/src/nvim/term.c +++ b/src/nvim/term.c @@ -639,7 +639,7 @@ static struct builtin_term builtin_termcaps[] = {K_BS, "\x7f"}, /* for some reason 0177 doesn't work */ # endif -# if defined(ALL_BUILTIN_TCAPS) || defined(__MINT__) +# if defined(ALL_BUILTIN_TCAPS) /* * Ordinary vt52 */ @@ -998,7 +998,7 @@ static struct builtin_term builtin_termcaps[] = -#if defined(UNIX) && !defined(__MINT__) +#if defined(UNIX) # define DEFAULT_TERM (char_u *)"ansi" #endif |