Merge branch 'master' into rexy712
This commit is contained in:
commit
d6b5c13281
@ -222,10 +222,10 @@
|
|||||||
<blockquote><p>Try holding down the Shift key and selecting or pasting the text as you normally would.</p></blockquote>
|
<blockquote><p>Try holding down the Shift key and selecting or pasting the text as you normally would.</p></blockquote>
|
||||||
<h3><a name="4.6"></a>4.6. When I paste text into a document, each line gets indented further than the last. Why? And how can I stop this?</h3>
|
<h3><a name="4.6"></a>4.6. When I paste text into a document, each line gets indented further than the last. Why? And how can I stop this?</h3>
|
||||||
<blockquote><p>You have the <i>autoindent</i> feature turned on. Hit <b>Meta-I</b> to turn it off, paste your text, and then hit <b>Meta-I</b> again to turn it back on.</p>
|
<blockquote><p>You have the <i>autoindent</i> feature turned on. Hit <b>Meta-I</b> to turn it off, paste your text, and then hit <b>Meta-I</b> again to turn it back on.</p>
|
||||||
<p><i>Update:</i> Since version 4.8, nano will suppress auto-indentation during a paste, so you no longer need to toggle it off and on manually.</p></blockquote>
|
<p><i>Update:</i> Since version 4.8, nano will suppress auto-indentation during a paste (when your terminal understands <a href="https://en.wikipedia.org/wiki/Bracketed-paste">bracketed pastes</a>), so you no longer need to toggle it off and on manually.</p></blockquote>
|
||||||
<h3><a name="4.7"></a>4.7. When I paste from Windows into a remote nano, nano rewraps the lines. What gives?</h3>
|
<h3><a name="4.7"></a>4.7. When I paste from Windows into a remote nano, nano rewraps the lines. What gives?</h3>
|
||||||
<blockquote><p>When pasting from Windows, in some situations linefeeds are sent instead of carriage returns (Enters). And linefeeds are <b>^J</b>s, which make nano justify (rewrap) the current paragraph. To prevent these linefeeds from causing these unwanted justifications, add this line to your .nanorc on the remote Linux box: <b>unbind ^J main</b> or <b>bind ^J enter main</b>, depending on whether the paste contains CR + LF or only LF.</p>
|
<blockquote><p>When pasting from Windows, in some situations linefeeds are sent instead of carriage returns (Enters). And linefeeds are <b>^J</b>s, which make nano justify (rewrap) the current paragraph. To prevent these linefeeds from causing these unwanted justifications, add this line to your .nanorc on the remote Linux box: <b>unbind ^J main</b> or <b>bind ^J enter main</b>, depending on whether the paste contains CR + LF or only LF.</p>
|
||||||
<p><i>Update:</i> Since version 4.8, nano will ignore linefeed characters in a paste, so you no longer need the above workaround.</p></blockquote>
|
<p><i>Update:</i> Since version 4.8, nano will ignore linefeed characters in a paste (when your terminal understands <a href="https://en.wikipedia.org/wiki/Bracketed-paste">bracketed pastes</a>), so you no longer need the above workaround.</p></blockquote>
|
||||||
<h3><a name="4.8"></a>4.8. I've compiled nano with color support, but I don't see any color when I run it!</h3>
|
<h3><a name="4.8"></a>4.8. I've compiled nano with color support, but I don't see any color when I run it!</h3>
|
||||||
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Several example configurations are in the <b>syntax/</b> subdirectory of the nano source, which are normally installed to <b>/usr/local/share/nano/</b>. To enable all of them, uncomment the line <b># include "/usr/local/share/nano/*.nanorc"</b> in your nanorc. See also section <a href="#3.9">3.9</a>.</p></blockquote>
|
<blockquote><p>If you want nano to actually use color, you have to specify the color configurations you want it to use in your .nanorc. Several example configurations are in the <b>syntax/</b> subdirectory of the nano source, which are normally installed to <b>/usr/local/share/nano/</b>. To enable all of them, uncomment the line <b># include "/usr/local/share/nano/*.nanorc"</b> in your nanorc. See also section <a href="#3.9">3.9</a>.</p></blockquote>
|
||||||
<h3><a name="4.9"></a>4.9. How do I make nano my default editor (in Pine, mutt, etc.)?</h3>
|
<h3><a name="4.9"></a>4.9. How do I make nano my default editor (in Pine, mutt, etc.)?</h3>
|
||||||
|
|||||||
@ -436,7 +436,10 @@ char *browse(char *path)
|
|||||||
|
|
||||||
titlebar(path);
|
titlebar(path);
|
||||||
|
|
||||||
while (TRUE) {
|
if (list_length == 0) {
|
||||||
|
statusline(ALERT, _("No entries"));
|
||||||
|
napms(1200);
|
||||||
|
} else while (TRUE) {
|
||||||
functionptrtype function;
|
functionptrtype function;
|
||||||
int kbinput;
|
int kbinput;
|
||||||
|
|
||||||
|
|||||||
@ -214,6 +214,9 @@
|
|||||||
#define SHIFT_DELETE 0x45D
|
#define SHIFT_DELETE 0x45D
|
||||||
#define SHIFT_TAB 0x45F
|
#define SHIFT_TAB 0x45F
|
||||||
|
|
||||||
|
#define FOCUS_IN 0x491
|
||||||
|
#define FOCUS_OUT 0x499
|
||||||
|
|
||||||
/* Special keycodes for when a string bind has been partially implanted
|
/* Special keycodes for when a string bind has been partially implanted
|
||||||
* or has an unpaired opening brace, or when a function in a string bind
|
* or has an unpaired opening brace, or when a function in a string bind
|
||||||
* needs execution or a specified function name is invalid. */
|
* needs execution or a specified function name is invalid. */
|
||||||
|
|||||||
@ -107,6 +107,7 @@ int altpageup, altpagedown;
|
|||||||
int altinsert, altdelete;
|
int altinsert, altdelete;
|
||||||
int shiftaltleft, shiftaltright, shiftaltup, shiftaltdown;
|
int shiftaltleft, shiftaltright, shiftaltup, shiftaltdown;
|
||||||
#endif
|
#endif
|
||||||
|
int mousefocusin, mousefocusout;
|
||||||
|
|
||||||
#ifdef ENABLED_WRAPORJUSTIFY
|
#ifdef ENABLED_WRAPORJUSTIFY
|
||||||
ssize_t fill = -COLUMNS_FROM_EOL;
|
ssize_t fill = -COLUMNS_FROM_EOL;
|
||||||
|
|||||||
@ -2434,6 +2434,8 @@ int main(int argc, char **argv)
|
|||||||
shiftaltup = get_keycode("kUP4", SHIFT_ALT_UP);
|
shiftaltup = get_keycode("kUP4", SHIFT_ALT_UP);
|
||||||
shiftaltdown = get_keycode("kDN4", SHIFT_ALT_DOWN);
|
shiftaltdown = get_keycode("kDN4", SHIFT_ALT_DOWN);
|
||||||
#endif
|
#endif
|
||||||
|
mousefocusin = get_keycode("kxIN", FOCUS_IN);
|
||||||
|
mousefocusout = get_keycode("kxOUT", FOCUS_OUT);
|
||||||
|
|
||||||
#ifdef HAVE_SET_ESCDELAY
|
#ifdef HAVE_SET_ESCDELAY
|
||||||
/* Tell ncurses to pass the Esc key quickly. */
|
/* Tell ncurses to pass the Esc key quickly. */
|
||||||
|
|||||||
@ -80,6 +80,7 @@ extern int altinsert, altdelete;
|
|||||||
extern int shiftaltleft, shiftaltright;
|
extern int shiftaltleft, shiftaltright;
|
||||||
extern int shiftaltup, shiftaltdown;
|
extern int shiftaltup, shiftaltdown;
|
||||||
#endif
|
#endif
|
||||||
|
extern int mousefocusin, mousefocusout;
|
||||||
|
|
||||||
#ifdef ENABLED_WRAPORJUSTIFY
|
#ifdef ENABLED_WRAPORJUSTIFY
|
||||||
extern ssize_t fill;
|
extern ssize_t fill;
|
||||||
|
|||||||
16
src/rcfile.c
16
src/rcfile.c
@ -991,16 +991,22 @@ void parse_includes(char *ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return the index of the color that is closest to the given RGB levels,
|
/* Return the index of the color that is closest to the given RGB levels,
|
||||||
* assuming that the terminal uses the 6x6x6 color cube of xterm-256color. */
|
* assuming that the terminal uses the 6x6x6 color cube of xterm-256color.
|
||||||
|
* When red == green == blue, return an index in the xterm gray scale. */
|
||||||
short closest_index_color(short red, short green, short blue)
|
short closest_index_color(short red, short green, short blue)
|
||||||
{
|
{
|
||||||
/* Translation table, from 16 intended levels to 6 available levels. */
|
/* Translation table, from 16 intended color levels to 6 available levels. */
|
||||||
static const short level[] = { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 };
|
static const short level[] = { 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 };
|
||||||
|
|
||||||
if (COLORS == 256)
|
/* Translation table, from 14 intended gray levels to 24 available levels. */
|
||||||
return (36 * level[red] + 6 * level[green] + level[blue] + 16);
|
static const short gray[] = { 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15, 18, 21, 23 };
|
||||||
else
|
|
||||||
|
if (COLORS != 256)
|
||||||
return THE_DEFAULT;
|
return THE_DEFAULT;
|
||||||
|
else if (red == green && green == blue && 0 < red && red < 0xF)
|
||||||
|
return 232 + gray[red - 1];
|
||||||
|
else
|
||||||
|
return (36 * level[red] + 6 * level[green] + level[blue] + 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define COLORCOUNT 34
|
#define COLORCOUNT 34
|
||||||
|
|||||||
@ -1294,6 +1294,10 @@ int parse_kbinput(WINDOW *frame)
|
|||||||
return INDENT_KEY;
|
return INDENT_KEY;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Spurious codes from VTE -- see https://sv.gnu.org/bugs/?64578. */
|
||||||
|
if (keycode == mousefocusin || keycode == mousefocusout)
|
||||||
|
return ERR;
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case KEY_SLEFT:
|
case KEY_SLEFT:
|
||||||
shift_held = TRUE;
|
shift_held = TRUE;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user