From fab0d4e740c266f52c839ccfabd242f0e905e90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 3 Oct 2015 12:08:30 +0200 Subject: [PATCH] core: add option weechat.look.paste_auto_add_newline (closes #543) --- ChangeLog.asciidoc | 1 + doc/de/autogen/user/weechat_options.asciidoc | 5 +++++ doc/en/autogen/user/weechat_options.asciidoc | 5 +++++ doc/fr/autogen/user/weechat_options.asciidoc | 5 +++++ doc/it/autogen/user/weechat_options.asciidoc | 5 +++++ doc/ja/autogen/user/weechat_options.asciidoc | 5 +++++ doc/pl/autogen/user/weechat_options.asciidoc | 5 +++++ po/cs.po | 7 ++++++- po/de.po | 7 ++++++- po/es.po | 7 ++++++- po/fr.po | 11 +++++++++-- po/hu.po | 7 ++++++- po/it.po | 7 ++++++- po/ja.po | 7 ++++++- po/pl.po | 7 ++++++- po/pt_BR.po | 7 ++++++- po/ru.po | 7 ++++++- po/tr.po | 7 ++++++- po/weechat.pot | 7 ++++++- src/core/wee-config.c | 7 +++++++ src/core/wee-config.h | 1 + src/gui/gui-key.c | 3 ++- 22 files changed, 116 insertions(+), 14 deletions(-) diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc index 77cc9ba79..1fe74e908 100644 --- a/ChangeLog.asciidoc +++ b/ChangeLog.asciidoc @@ -19,6 +19,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] === New features +* core: add option weechat.look.paste_auto_add_newline (issue #543) * core: display a more explicit error when a filter fails to be added (issue #522) * api: add function string_hex_dump() diff --git a/doc/de/autogen/user/weechat_options.asciidoc b/doc/de/autogen/user/weechat_options.asciidoc index 226024726..e2cac0129 100644 --- a/doc/de/autogen/user/weechat_options.asciidoc +++ b/doc/de/autogen/user/weechat_options.asciidoc @@ -742,6 +742,11 @@ ** Typ: Zeichenkette ** Werte: beliebige Zeichenkette (Standardwert: `""`) +* [[option_weechat.look.paste_auto_add_newline]] *weechat.look.paste_auto_add_newline* +** Beschreibung: `automatically add a newline at the end of pasted text if there are at least two lines and if a confirmation is asked` +** Typ: boolesch +** Werte: on, off (Standardwert: `on`) + * [[option_weechat.look.paste_bracketed]] *weechat.look.paste_bracketed* ** Beschreibung: `aktiviert den "bracketed paste mode" des Terminals (wird nicht durch alle Terminals/Multiplexer unterstützt): Dieser Modus erlaubt das Einfügen von Steuersequenzen die in Klammern gesetzt sind. WeeChat kann dadurch ermitteln ob ein Text eingefügt oder geschrieben wurde ("ESC[200~", gefolgt von dem einzufügenden Text und einem abschließenden "ESC[201~")` ** Typ: boolesch diff --git a/doc/en/autogen/user/weechat_options.asciidoc b/doc/en/autogen/user/weechat_options.asciidoc index 6cae46645..2791b8229 100644 --- a/doc/en/autogen/user/weechat_options.asciidoc +++ b/doc/en/autogen/user/weechat_options.asciidoc @@ -742,6 +742,11 @@ ** type: string ** values: any string (default value: `""`) +* [[option_weechat.look.paste_auto_add_newline]] *weechat.look.paste_auto_add_newline* +** description: `automatically add a newline at the end of pasted text if there are at least two lines and if a confirmation is asked` +** type: boolean +** values: on, off (default value: `on`) + * [[option_weechat.look.paste_bracketed]] *weechat.look.paste_bracketed* ** description: `enable terminal "bracketed paste mode" (not supported in all terminals/multiplexers): in this mode, pasted text is bracketed with control sequences so that WeeChat can differentiate pasted text from typed-in text ("ESC[200~", followed by the pasted text, followed by "ESC[201~")` ** type: boolean diff --git a/doc/fr/autogen/user/weechat_options.asciidoc b/doc/fr/autogen/user/weechat_options.asciidoc index f6bbd2773..728c7085f 100644 --- a/doc/fr/autogen/user/weechat_options.asciidoc +++ b/doc/fr/autogen/user/weechat_options.asciidoc @@ -742,6 +742,11 @@ ** type: chaîne ** valeurs: toute chaîne (valeur par défaut: `""`) +* [[option_weechat.look.paste_auto_add_newline]] *weechat.look.paste_auto_add_newline* +** description: `ajouter automatiquement une nouvelle ligne à la fin du texte collé s'il y a au moins deux lignes et si une confirmation est demandée` +** type: booléen +** valeurs: on, off (valeur par défaut: `on`) + * [[option_weechat.look.paste_bracketed]] *weechat.look.paste_bracketed* ** description: `activer le mode du terminal "bracketed paste" (pas supporté par tous les terminaux/multiplexeurs) : dans ce mode, le texte collé est entouré avec des séquences de contrôle de sorte que WeeChat puisse différencier le texte collé du texte tapé ("ESC[200~", suivi par le texte collé, suivi par "ESC[201~")` ** type: booléen diff --git a/doc/it/autogen/user/weechat_options.asciidoc b/doc/it/autogen/user/weechat_options.asciidoc index 702e17af3..b844fdcf4 100644 --- a/doc/it/autogen/user/weechat_options.asciidoc +++ b/doc/it/autogen/user/weechat_options.asciidoc @@ -742,6 +742,11 @@ ** tipo: stringa ** valori: qualsiasi stringa (valore predefinito: `""`) +* [[option_weechat.look.paste_auto_add_newline]] *weechat.look.paste_auto_add_newline* +** descrizione: `automatically add a newline at the end of pasted text if there are at least two lines and if a confirmation is asked` +** tipo: bool +** valori: on, off (valore predefinito: `on`) + * [[option_weechat.look.paste_bracketed]] *weechat.look.paste_bracketed* ** descrizione: `abilita la modalità "bracketed paste" per il terminale (non supportata da tutti i terminali/multiplexer): in questa modalità, il testo incollato viene racchiuso da sequenze di controllo in modo che WeeChat possa differenziare il testo incollato dal testo digitato ("ESC[200~", seguito dal testo incollato, seguito da "ESC[201~")` ** tipo: bool diff --git a/doc/ja/autogen/user/weechat_options.asciidoc b/doc/ja/autogen/user/weechat_options.asciidoc index 9270d2533..31d489d58 100644 --- a/doc/ja/autogen/user/weechat_options.asciidoc +++ b/doc/ja/autogen/user/weechat_options.asciidoc @@ -742,6 +742,11 @@ ** タイプ: 文字列 ** 値: 未制約文字列 (デフォルト値: `""`) +* [[option_weechat.look.paste_auto_add_newline]] *weechat.look.paste_auto_add_newline* +** 説明: `automatically add a newline at the end of pasted text if there are at least two lines and if a confirmation is asked` +** タイプ: ブール +** 値: on, off (デフォルト値: `on`) + * [[option_weechat.look.paste_bracketed]] *weechat.look.paste_bracketed* ** 説明: `端末の「括弧付きペーストモード」を有効化 (一部の端末/マルチプレクサで利用可能): このモードでは、ペーストされたテキストはコントロールシーケンスで括られます。これにより WeeChat はペーストされたテキストとタイプされたテキストを区別する ("ESC[200~" 、ペーストされたテキスト、"ESC[201~")` ** タイプ: ブール diff --git a/doc/pl/autogen/user/weechat_options.asciidoc b/doc/pl/autogen/user/weechat_options.asciidoc index 64dfcc885..62e26b089 100644 --- a/doc/pl/autogen/user/weechat_options.asciidoc +++ b/doc/pl/autogen/user/weechat_options.asciidoc @@ -742,6 +742,11 @@ ** typ: ciąg ** wartości: dowolny ciąg (domyślna wartość: `""`) +* [[option_weechat.look.paste_auto_add_newline]] *weechat.look.paste_auto_add_newline* +** opis: `automatically add a newline at the end of pasted text if there are at least two lines and if a confirmation is asked` +** typ: bool +** wartości: on, off (domyślna wartość: `on`) + * [[option_weechat.look.paste_bracketed]] *weechat.look.paste_bracketed* ** opis: `włącza tryb terminala "bracketed paste mode" (nie wszystkie terminale/multiplexery ją wspierają): w tym trybie, wklejany tekst jest otoczony sekwencją kontrolna, dzięki czemu WeeChat może odróżnić tekst wklejony od wpisanego ("ESC[200~", wklejony tekst, "ESC[201~")` ** typ: bool diff --git a/po/cs.po b/po/cs.po index 2f5f6617f..bf9afef4b 100644 --- a/po/cs.po +++ b/po/cs.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-30 20:54+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -3218,6 +3218,11 @@ msgstr "text pro zobrazení před přezdívkou v okně rozhovoru" msgid "text to display after nick in prefix of message, example: \">\"" msgstr "text pro zobrazení za přezdívkou v okně rozhovoru" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/de.po b/po/de.po index c1f03607a..5287bde47 100644 --- a/po/de.po +++ b/po/de.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-30 20:54+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German <>\n" @@ -3811,6 +3811,11 @@ msgstr "Text, der vor dem Nick dargestellt werden soll, Beispiel: \"<\"" msgid "text to display after nick in prefix of message, example: \">\"" msgstr "Text, der nach dem Nick dargestellt werden soll, Beispiel: \">\"" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/es.po b/po/es.po index e141b9d57..bb53bb299 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-30 20:55+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -3382,6 +3382,11 @@ msgstr "texto a mostrar antes del apodo en la ventana de charla" msgid "text to display after nick in prefix of message, example: \">\"" msgstr "texto a mostrar tras el apodo en la ventana de charla" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/fr.po b/po/fr.po index 09770a84a..cf049bd60 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" -"PO-Revision-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" +"PO-Revision-Date: 2015-10-03 12:05+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -3708,6 +3708,13 @@ msgstr "texte à afficher avant le pseudo dans le préfixe, exemple : \"<\"" msgid "text to display after nick in prefix of message, example: \">\"" msgstr "texte à afficher après le pseudo dans le préfixe, exemple : \">\"" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" +"ajouter automatiquement une nouvelle ligne à la fin du texte collé s'il y a " +"au moins deux lignes et si une confirmation est demandée" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/hu.po b/po/hu.po index 64dbf5044..831a76828 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -2811,6 +2811,11 @@ msgstr "a név előtt megjelenítendő szöveg a beszédablakban" msgid "text to display after nick in prefix of message, example: \">\"" msgstr "a név után megjelenítendő szöveg a beszédablakban" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/it.po b/po/it.po index a8d82b2fd..435115611 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-30 20:55+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -3479,6 +3479,11 @@ msgid "text to display after nick in prefix of message, example: \">\"" msgstr "" "testo da visualizzare dopo il nick nel prefisso del messaggio, esempio: \">\"" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/ja.po b/po/ja.po index 0f255680c..362fd0491 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-30 20:55+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -3587,6 +3587,11 @@ msgid "text to display after nick in prefix of message, example: \">\"" msgstr "" "メッセージプレフィックス中のニックネームの後に表示するテキスト、例: \">\"" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/pl.po b/po/pl.po index b21878a1e..de082f78f 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-30 20:56+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -3666,6 +3666,11 @@ msgid "text to display after nick in prefix of message, example: \">\"" msgstr "" "teks wyświetlany za nickiem w prefiksie wiadomości, przykład: przykład: \">\"" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/pt_BR.po b/po/pt_BR.po index ae72c255f..662957c7b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-30 20:56+0200\n" "Last-Translator: Eduardo Elias \n" "Language-Team: weechat-dev \n" @@ -3400,6 +3400,11 @@ msgid "text to display after nick in prefix of message, example: \">\"" msgstr "" "texto a ser exibido depois do apelido no prefixo da mensage, examplo: \">\"" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/ru.po b/po/ru.po index e788900c5..60ada5a06 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-09-09 09:13+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -2843,6 +2843,11 @@ msgstr "текст, который отображать до ника в окн msgid "text to display after nick in prefix of message, example: \">\"" msgstr "текст, который отображать после ника в окне чата" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/tr.po b/po/tr.po index bdd1d63e3..41faac618 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2015-03-10 21:33+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -2552,6 +2552,11 @@ msgstr "" msgid "text to display after nick in prefix of message, example: \">\"" msgstr "" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/po/weechat.pot b/po/weechat.pot index d992f24eb..f682a09f8 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2015-09-30 20:53+0200\n" +"POT-Creation-Date: 2015-10-03 12:04+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -2548,6 +2548,11 @@ msgstr "" msgid "text to display after nick in prefix of message, example: \">\"" msgstr "" +msgid "" +"automatically add a newline at the end of pasted text if there are at least " +"two lines and if a confirmation is asked" +msgstr "" + msgid "" "enable terminal \"bracketed paste mode\" (not supported in all terminals/" "multiplexers): in this mode, pasted text is bracketed with control sequences " diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 78a570d0f..247c2ea5a 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -148,6 +148,7 @@ struct t_config_option *config_look_mouse; struct t_config_option *config_look_mouse_timer_delay; struct t_config_option *config_look_nick_prefix; struct t_config_option *config_look_nick_suffix; +struct t_config_option *config_look_paste_auto_add_newline; struct t_config_option *config_look_paste_bracketed; struct t_config_option *config_look_paste_bracketed_timer_delay; struct t_config_option *config_look_paste_max_lines; @@ -2653,6 +2654,12 @@ config_weechat_init_options () N_("text to display after nick in prefix of message, example: \">\""), NULL, 0, 0, "", NULL, 0, NULL, NULL, &config_change_nick_prefix_suffix, NULL, NULL, NULL); + config_look_paste_auto_add_newline = config_file_new_option ( + weechat_config_file, ptr_section, + "paste_auto_add_newline", "boolean", + N_("automatically add a newline at the end of pasted text if there " + "are at least two lines and if a confirmation is asked"), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); config_look_paste_bracketed = config_file_new_option ( weechat_config_file, ptr_section, "paste_bracketed", "boolean", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 9ce97a4f9..443a6f82d 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -194,6 +194,7 @@ extern struct t_config_option *config_look_mouse; extern struct t_config_option *config_look_mouse_timer_delay; extern struct t_config_option *config_look_nick_prefix; extern struct t_config_option *config_look_nick_suffix; +extern struct t_config_option *config_look_paste_auto_add_newline; extern struct t_config_option *config_look_paste_bracketed; extern struct t_config_option *config_look_paste_bracketed_timer_delay; extern struct t_config_option *config_look_paste_max_lines; diff --git a/src/gui/gui-key.c b/src/gui/gui-key.c index 97c50c5c3..9e2dfec21 100644 --- a/src/gui/gui-key.c +++ b/src/gui/gui-key.c @@ -1816,7 +1816,8 @@ gui_key_paste_accept () * add final newline if there is not in pasted text * (for at least 2 lines pasted) */ - if ((gui_key_get_paste_lines () > 1) + if (CONFIG_BOOLEAN(config_look_paste_auto_add_newline) + && (gui_key_get_paste_lines () > 1) && (gui_key_buffer_size > 0) && (gui_key_buffer[gui_key_buffer_size - 1] != '\r') && (gui_key_buffer[gui_key_buffer_size - 1] != '\n'))