mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 22:29:42 +03:00
build: fix compilation when configured with --enable-tiny
Problem existed since commit 3b657a26
from five days ago.
In addition, exclude pasting-at-the-prompt from the tiny version, as
it's hardly useful when one cannot copy a selected piece of text.
This commit is contained in:
parent
a61586947e
commit
8546139997
@ -1187,8 +1187,10 @@ void shortcut_init(void)
|
|||||||
add_to_sclist(MMAIN, "^\\", 0, do_replace, 0);
|
add_to_sclist(MMAIN, "^\\", 0, do_replace, 0);
|
||||||
add_to_sclist(MMAIN, "M-R", 0, do_replace, 0);
|
add_to_sclist(MMAIN, "M-R", 0, do_replace, 0);
|
||||||
add_to_sclist(MMOST, "^K", 0, cut_text, 0);
|
add_to_sclist(MMOST, "^K", 0, cut_text, 0);
|
||||||
|
#ifdef NANO_TINY
|
||||||
|
add_to_sclist(MMAIN, "^U", 0, paste_text, 0);
|
||||||
|
#else
|
||||||
add_to_sclist(MMOST, "^U", 0, paste_text, 0);
|
add_to_sclist(MMOST, "^U", 0, paste_text, 0);
|
||||||
#ifndef NANO_TINY
|
|
||||||
add_to_sclist(MMAIN, "^T", 0, do_execute, 0);
|
add_to_sclist(MMAIN, "^T", 0, do_execute, 0);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_JUSTIFY
|
#ifdef ENABLE_JUSTIFY
|
||||||
|
@ -166,6 +166,7 @@ void lop_the_answer(void)
|
|||||||
answer[typing_x] = '\0';
|
answer[typing_x] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
/* Copy the current answer (if any) into the cutbuffer. */
|
/* Copy the current answer (if any) into the cutbuffer. */
|
||||||
void copy_the_answer(void)
|
void copy_the_answer(void)
|
||||||
{
|
{
|
||||||
@ -193,6 +194,7 @@ void paste_into_answer(void)
|
|||||||
answer = fusion;
|
answer = fusion;
|
||||||
typing_x += pastelen;
|
typing_x += pastelen;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MOUSE
|
#ifdef ENABLE_MOUSE
|
||||||
/* Handle a mouse click on the status-bar prompt or the shortcut list. */
|
/* Handle a mouse click on the status-bar prompt or the shortcut list. */
|
||||||
@ -355,12 +357,15 @@ int do_statusbar_input(bool *finished)
|
|||||||
do_statusbar_backspace();
|
do_statusbar_backspace();
|
||||||
else if (shortcut->func == cut_text)
|
else if (shortcut->func == cut_text)
|
||||||
lop_the_answer();
|
lop_the_answer();
|
||||||
|
#ifndef NANO_TINY
|
||||||
else if (shortcut->func == copy_text)
|
else if (shortcut->func == copy_text)
|
||||||
copy_the_answer();
|
copy_the_answer();
|
||||||
else if (shortcut->func == paste_text) {
|
else if (shortcut->func == paste_text) {
|
||||||
if (cutbuffer != NULL)
|
if (cutbuffer != NULL)
|
||||||
paste_into_answer();
|
paste_into_answer();
|
||||||
} else {
|
}
|
||||||
|
#endif
|
||||||
|
else {
|
||||||
/* Handle any other shortcut in the current menu, setting finished
|
/* Handle any other shortcut in the current menu, setting finished
|
||||||
* to TRUE to indicate that we're done after running or trying to
|
* to TRUE to indicate that we're done after running or trying to
|
||||||
* run its associated function. */
|
* run its associated function. */
|
||||||
|
Loading…
Reference in New Issue
Block a user