build: exclude bracketed pasting from the tiny version
Этот коммит содержится в:
родитель
f571d6ba36
Коммит
5111b20bf5
@ -1408,9 +1408,10 @@ void shortcut_init(void)
|
|||||||
#ifdef ENABLE_SPELLER
|
#ifdef ENABLE_SPELLER
|
||||||
add_to_sclist(MMAIN, "F12", KEY_F(12), do_spell, 0);
|
add_to_sclist(MMAIN, "F12", KEY_F(12), do_spell, 0);
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef NANO_TINY
|
||||||
/* Catch and ignore bracketed paste marker keys. */
|
/* Catch and ignore bracketed paste marker keys. */
|
||||||
add_to_sclist(MMOST|MHELP|MBROWSER|MYESNO, "", BRACKETED_PASTE_MARKER, do_nothing, 0);
|
add_to_sclist(MMOST|MHELP|MBROWSER|MYESNO, "", BRACKETED_PASTE_MARKER, do_nothing, 0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
|
@ -310,10 +310,10 @@ void restore_terminal(void)
|
|||||||
{
|
{
|
||||||
curs_set(1);
|
curs_set(1);
|
||||||
endwin();
|
endwin();
|
||||||
|
#ifndef NANO_TINY
|
||||||
printf("\e[?2004l");
|
printf("\e[?2004l");
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
#endif
|
||||||
tcsetattr(0, TCSANOW, &original_state);
|
tcsetattr(0, TCSANOW, &original_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1447,6 +1447,7 @@ bool okay_for_view(const keystruct *shortcut)
|
|||||||
return (item == NULL || item->viewok);
|
return (item == NULL || item->viewok);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
/* Read in all waiting input bytes and paste them into the buffer in one go. */
|
/* Read in all waiting input bytes and paste them into the buffer in one go. */
|
||||||
void suck_up_input_and_paste_it(void)
|
void suck_up_input_and_paste_it(void)
|
||||||
{
|
{
|
||||||
@ -1480,6 +1481,7 @@ void suck_up_input_and_paste_it(void)
|
|||||||
|
|
||||||
cutbuffer = was_cutbuffer;
|
cutbuffer = was_cutbuffer;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Read in a keystroke. Act on the keystroke if it is a shortcut or a toggle;
|
/* Read in a keystroke. Act on the keystroke if it is a shortcut or a toggle;
|
||||||
* otherwise, insert it into the edit buffer. */
|
* otherwise, insert it into the edit buffer. */
|
||||||
@ -1637,8 +1639,10 @@ void do_input(void)
|
|||||||
shortcut->func == do_backspace))
|
shortcut->func == do_backspace))
|
||||||
update_line(openfile->current, openfile->current_x);
|
update_line(openfile->current, openfile->current_x);
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
if (bracketed_paste)
|
if (bracketed_paste)
|
||||||
suck_up_input_and_paste_it();
|
suck_up_input_and_paste_it();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The user typed output_len multibyte characters. Add them to the edit
|
/* The user typed output_len multibyte characters. Add them to the edit
|
||||||
|
@ -1095,6 +1095,7 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
|
|||||||
/* Discard broken sequences that Slang produces. */
|
/* Discard broken sequences that Slang produces. */
|
||||||
*consumed = 4;
|
*consumed = 4;
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef NANO_TINY
|
||||||
else if (length > 4 && seq[2] == '0' && seq[4] == '~') {
|
else if (length > 4 && seq[2] == '0' && seq[4] == '~') {
|
||||||
/* Esc [ 2 0 0 ~ == start of a bracketed paste,
|
/* Esc [ 2 0 0 ~ == start of a bracketed paste,
|
||||||
* Esc [ 2 0 1 ~ == end of a bracketed paste. */
|
* Esc [ 2 0 1 ~ == end of a bracketed paste. */
|
||||||
@ -1107,6 +1108,7 @@ int convert_sequence(const int *seq, size_t length, int *consumed)
|
|||||||
return BRACKETED_PASTE_MARKER;
|
return BRACKETED_PASTE_MARKER;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case '3': /* Esc [ 3 ~ == Delete on VT220/VT320/
|
case '3': /* Esc [ 3 ~ == Delete on VT220/VT320/
|
||||||
* Linux console/xterm/Terminal. */
|
* Linux console/xterm/Terminal. */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user