Compare commits
48 Commits
v1.9.99pre
...
v1.9.99pre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1295699d03 | ||
|
|
ee8edfc64c | ||
|
|
273b9e8d5b | ||
|
|
85f9f0f941 | ||
|
|
385e772e54 | ||
|
|
ab8c7162d3 | ||
|
|
152f57bf9c | ||
|
|
8ee8915c49 | ||
|
|
a447a2d810 | ||
|
|
22066a2cad | ||
|
|
c603fefbf6 | ||
|
|
b5652a4d56 | ||
|
|
98bca94758 | ||
|
|
8c9256a731 | ||
|
|
89ae4a343c | ||
|
|
61525a1e29 | ||
|
|
97e0d665de | ||
|
|
e4769dfeab | ||
|
|
ee35aa3b01 | ||
|
|
23b9907048 | ||
|
|
85307fe28e | ||
|
|
1755e28ad9 | ||
|
|
6db9ebbe04 | ||
|
|
77369f425b | ||
|
|
52804ab8e8 | ||
|
|
6e379c254e | ||
|
|
2953f783e3 | ||
|
|
48f67a5c4c | ||
|
|
d09eb8374a | ||
|
|
b9f007430b | ||
|
|
0061bf5b71 | ||
|
|
4ab14c6ad0 | ||
|
|
768a75ff5f | ||
|
|
012425c401 | ||
|
|
f5a720dfda | ||
|
|
b7a5be6739 | ||
|
|
ce1c9ac363 | ||
|
|
1b36fc16f5 | ||
|
|
7f0cfd5304 | ||
|
|
b011e440b4 | ||
|
|
464c8a808c | ||
|
|
d2b1f52d17 | ||
|
|
7d15d1d8d8 | ||
|
|
a1b6997066 | ||
|
|
9054e3a2ae | ||
|
|
1b3e4e117a | ||
|
|
3879528945 | ||
|
|
185dc6acd0 |
52
ChangeLog
52
ChangeLog
@@ -1,3 +1,53 @@
|
||||
GNU nano 1.9.99pre3 - 2006.10.25
|
||||
- chars.c:
|
||||
nstrncasecmp()
|
||||
- When returning, use the "?" operator instead of an if/else
|
||||
clause. (DLR)
|
||||
- cut.c:
|
||||
do_cut_text()
|
||||
- When uncutting text in the process of copying it, always set
|
||||
placewewant, as do_uncut_text() does, so that the current line
|
||||
is always updated properly. (DLR)
|
||||
- files.c:
|
||||
input_tab()
|
||||
- Since the field precision operator used in the sprintf() uses
|
||||
ints and not size_t's, replace it with two strncpy()s, which
|
||||
use size_t's, and a null termination. (DLR)
|
||||
- help.c:
|
||||
parse_help_input()
|
||||
- Add 'E' and 'e' as aliases for Exit, for consistency with the
|
||||
file browser. (DLR)
|
||||
- m4/ac_define_dir.m4:
|
||||
- Import the latest version of this file from
|
||||
http://autoconf-archive.cryp.to/ac_define_dir.m4.
|
||||
- doc/faq.html:
|
||||
- Update the question in section 4.13 to match the version of it
|
||||
in the answer section. (DLR)
|
||||
- doc/syntax/c.nanorc:
|
||||
- Simplify "undef", "ifn?def", "elif", and "else" in the
|
||||
preprocessor regexes. (DLR)
|
||||
|
||||
GNU nano 1.9.99pre2 - 2006.10.02
|
||||
- General:
|
||||
- Miscellaneous comment fixes. (DLR)
|
||||
- Make sure that the statusbar cursor position is always
|
||||
properly reset when we get out of all statusbar prompts.
|
||||
Changes to do_insertfile(), do_writeout(),
|
||||
handle_sigwinch(), main(), and do_prompt_abort(). (DLR)
|
||||
- prompt.c:
|
||||
do_statusbar_input()
|
||||
- If we get a verbatim input sequence ending with Ctrl-J, remove
|
||||
the Ctrl-J from the buffer before interpreting it as Enter, so
|
||||
that it doesn't erroneously fall through to the edit window
|
||||
and get interpreted as Justify. (DLR)
|
||||
- winio.c:
|
||||
get_input()
|
||||
- Simplify to avoid an unnecessary key_buffer_len check. (DLR)
|
||||
- doc/syntax/c.nanorc:
|
||||
- Add "size_t" and "ssize_t" to the types regexes. (DLR,
|
||||
suggested by Mike Frysinger)
|
||||
- Simplify "signed" and "unsigned" in the types regexes. (DLR)
|
||||
|
||||
GNU nano 1.9.99pre1 - 2006.08.29
|
||||
- General:
|
||||
- Miscellaneous comment fixes. (DLR)
|
||||
@@ -520,7 +570,7 @@ GNU nano 1.3.12 - 2006.06.26
|
||||
have fewer than 24 columns, for consistency with the toggle
|
||||
help text. (DLR, suggested by Benno Schulenberg)
|
||||
parse_help_input()
|
||||
- Add Space and - as aliases for PageDown and PageUp, for
|
||||
- Add Space and '-' as aliases for PageDown and PageUp, for
|
||||
consistency with the file browser. (DLR, suggested by Benno
|
||||
Schulenberg)
|
||||
- Remove redundant key checks. (DLR)
|
||||
|
||||
12
NEWS
12
NEWS
@@ -1,3 +1,15 @@
|
||||
2006.10.25 - GNU nano 1.9.99pre3 learns to appreciate life. This
|
||||
release fixes a bug where the screen sometimes wouldn't
|
||||
be updated properly after copying text into the
|
||||
cutbuffer, fixes a potential warning while compiling,
|
||||
and fixes a few other minor inconsistencies. Have fun.
|
||||
|
||||
2006.10.02 - GNU nano 1.9.99pre2 crosses the threshold. This release
|
||||
fixes a few more bugs: cursor positioning after leaving
|
||||
the statusbar prompt has been fixed, and verbatim input
|
||||
at the statusbar prompt now properly handles newlines.
|
||||
Enjoy.
|
||||
|
||||
2006.08.29 - GNU nano 1.9.99pre1 passes through the flames. This
|
||||
release fixes various bugs in the last version: the
|
||||
mouse support properly ignores everything except clicks
|
||||
|
||||
2
TODO
2
TODO
@@ -33,6 +33,8 @@ For the next version:
|
||||
- Add the ability to move to different lines of the screen with a single
|
||||
keystroke, e.g. M-` (M-~) to go to the top line, M-& (M-7) to go to
|
||||
the center line, and M-' (M-") to go to the last line.
|
||||
- Allow searching for and replacing newlines.
|
||||
- Allow soft wrapping as well as hard wrapping?
|
||||
|
||||
Old requests:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#
|
||||
# $Id$
|
||||
|
||||
AC_INIT([GNU nano], [1.9.99pre1], [nano-devel@gnu.org], [nano])
|
||||
AC_INIT([GNU nano], [1.9.99pre3], [nano-devel@gnu.org], [nano])
|
||||
AC_CONFIG_SRCDIR([src/nano.c])
|
||||
AC_CANONICAL_TARGET([])
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<a href="#4.10b">4.10b. [version 1.1.99pre1 and later] Hey, the search string behavior has reverted, it's now like Pico, what happened to the consistency?</a><br>
|
||||
<a href="#4.11">4.11. How do I make nano my default editor (in Pine, mutt, etc.)?</a><br>
|
||||
<a href="#4.12">4.12. I've compiled nano with color support, but I don't see any color when I run it!</a><br>
|
||||
<a href="#4.13">4.13. How do I select text for the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</a></p></blockquote>
|
||||
<a href="#4.13">4.13. How do I select text for or paste text from the clipboard in an X terminal when I'm running nano in one and nano's mouse support is turned on?</a></p></blockquote>
|
||||
<h2><a href="#5">5. Internationalization</a></h2>
|
||||
<blockquote><p><a href="#5.1">5.1. There's no translation for my language!</a><br>
|
||||
<a href="#5.2">5.2. I don't like the translation for <x> in my language. How can I fix it?</a><br>
|
||||
@@ -84,7 +84,7 @@
|
||||
<h2><a name="1.5"></a>1.5. Why the name change from TIP?</h2>
|
||||
<blockquote><p>On January 10, 2000, TIP was officially renamed to nano because of a namespace conflict with another program called 'tip'. The original 'tip' program "establishes a full duplex terminal connection to a remote host", and was included with many older Unix systems (and newer ones like Solaris). The conflict was not noticed at first because there is no 'tip' utility included with most GNU/Linux distributions (where nano was developed).</p></blockquote>
|
||||
<h2><a name="1.6"></a>1.6. What is the current version of nano?</h2>
|
||||
<blockquote><p>The current version of nano *should* be 1.9.99pre1. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<blockquote><p>The current version of nano *should* be 1.9.99pre3. Of course you should always check the nano homepage to see what the latest and greatest version is.</p></blockquote>
|
||||
<h2><a name="1.7"></a>1.7. I want to read the man page without having to download the program!</h2>
|
||||
<blockquote><p>Jeez, demanding, aren't we? Okay, look <a href="http://www.nano-editor.org/dist/v1.3/nano.1.html">here</a>.</p></blockquote>
|
||||
<hr width="100%">
|
||||
@@ -255,8 +255,8 @@
|
||||
<h2><a name="7.5"></a>7.5. Can I have CVS write access?</h2>
|
||||
<blockquote><p>Re-read Section <a href="#7.4">7.4</a> and you should know the answer.</p></blockquote>
|
||||
<h2><a name="8"></a>8. ChangeLog</h2>
|
||||
<blockquote>
|
||||
<p>2006/07/25 - Update section 5.3 again to not state "the latest development version" before 1.3.12, as it's no longer accurate. Also add some minor spacing fixes. (DLR)<br>
|
||||
<blockquote><p>2006/10/06 - Update the question in section 4.13 to match the version of it in the answer section. (DLR)<br>
|
||||
2006/07/25 - Update section 5.3 again to not state "the latest development version" before 1.3.12, as it's no longer accurate. Also add some minor spacing fixes. (DLR)<br>
|
||||
2006/06/12 - Update section 5.3, due to the display fix for two-column Unicode characters. (DLR)<br>
|
||||
2006/06/05 - Add a new section 4.8, and move all section 4 entries after it down one number, to explain how to deal with glibc 2.2.3's crashes involving extended regular expressions. (DLR)<br>
|
||||
2006/06/04 - Add minor punctuation, wording, and typo fixes. (DLR)<br>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
##
|
||||
syntax "c" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$"
|
||||
color brightred "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
|
||||
color green "\<(u_?)?int(8|16|32|64|ptr)_t\>"
|
||||
color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
|
||||
color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
|
||||
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
||||
color brightyellow "\<(for|if|while|do|else|case|default|switch)\>"
|
||||
color brightyellow "\<(try|throw|catch|operator|new|delete)\>"
|
||||
color magenta "\<(goto|continue|break|return)\>"
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|undef|include|ifn?def|endif|elif|else|if|warning|error)"
|
||||
color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||
color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
##
|
||||
## GCC builtins
|
||||
|
||||
@@ -13,9 +13,9 @@ dnl
|
||||
dnl @category Misc
|
||||
dnl @author Stepan Kasal <kasal@ucw.cz>
|
||||
dnl @author Andreas Schwab <schwab@suse.de>
|
||||
dnl @author Guido Draheim <guidod@gmx.de>
|
||||
dnl @author Guido U. Draheim <guidod@gmx.de>
|
||||
dnl @author Alexandre Oliva
|
||||
dnl @version 2005-07-29
|
||||
dnl @version 2006-10-13
|
||||
dnl @license AllPermissive
|
||||
|
||||
AC_DEFUN([AC_DEFINE_DIR], [
|
||||
|
||||
69
po/ChangeLog
69
po/ChangeLog
@@ -1,3 +1,66 @@
|
||||
2006-10-25 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
* nb.po: Updated Norwegian bokmål translation by
|
||||
Geir Helland.
|
||||
|
||||
2006-10-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by
|
||||
Francisco Javier Tsao Santín.
|
||||
|
||||
2006-10-16 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* eu.po: Updated Basque translation by Mikel Olasagasti.
|
||||
|
||||
2006-10-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* gl.po: Updated Galician translation by
|
||||
Francisco Javier Tsao Santín.
|
||||
|
||||
2006-10-02 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Refetch the current nano 1.9.99pre0 pt_BR file from
|
||||
the TP, as the latest file offered is apparently for 1.3.11pre1.
|
||||
|
||||
2006-10-02 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* pt_BR.po: Restore previous version of pt_BR, as it was for
|
||||
nano 1.9.99pre0, and the current version is for 1.3.11pre1.
|
||||
|
||||
2006-09-27 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||
Joao Victor Duarte Martins.
|
||||
|
||||
2006-09-10 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* hu.po: Removed unneeded duplicate plural forms again.
|
||||
|
||||
2006-09-10 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* hu.po: Updated Hungarian translation by Gabor Kelemen.
|
||||
|
||||
2006-09-02 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||
Joao Victor Duarte Martins.
|
||||
|
||||
2006-09-01 Benno Schulenberg <bensberg@justemail.net>
|
||||
|
||||
* ChangeLog: Fix incorrect years in two entries.
|
||||
|
||||
2006-08-31 David Lawrence Ramsey <pooka109@cox.net>
|
||||
|
||||
* bg.po: Fix misplaced space.
|
||||
|
||||
2006-08-31 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* de.po: Updated German translation by Michael Piefel.
|
||||
* es.po: Updated Spanish translation by
|
||||
Ricardo Javier Cardenes Medina.
|
||||
|
||||
2006-08-28 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* fr.po: Updated French translation by Jean-Philippe Guérard.
|
||||
@@ -103,7 +166,7 @@
|
||||
|
||||
* POTFILES.in: Add help.c.
|
||||
|
||||
2006-10-23 Jordi Mallach <jordi@gnu.org>
|
||||
2005-10-23 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
* eu.po: Updated Basque translation by Mikel Olasagasti.
|
||||
@@ -114,7 +177,7 @@
|
||||
* zh_TW: Updated Traditional Chinese translation by
|
||||
Wei-Lun Chao.
|
||||
|
||||
2006-08-22 Jordi Mallach <jordi@gnu.org>
|
||||
2005-08-22 Jordi Mallach <jordi@gnu.org>
|
||||
* bg.po: New Bulgarian translation by
|
||||
Yavor Doganov <yavor@doganov.org>.
|
||||
|
||||
@@ -173,7 +236,7 @@
|
||||
|
||||
2005-04-22 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
* ca.po: Updated Norwegian bokmål translation by
|
||||
* nb.po: Updated Norwegian bokmål translation by
|
||||
Geir Helland.
|
||||
|
||||
2005-04-20 Jordi Mallach <jordi@gnu.org>
|
||||
|
||||
2
po/bg.po
2
po/bg.po
@@ -1092,7 +1092,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Долните два реда показват най-често използваните бързи клавиши в редактора.\n"
|
||||
"\n"
|
||||
"Системата за отбелязване на бързи клавиши е следната: Комбинации с клавиша „Control“ се отбелязват с диакритичен символ (^) и могат да бъдат въвеждани с клавиша „Control“ (Ctrl) или с двойно натискане на клавиша „Escape“ (Esc). Комбинации с клавиша „Escape“ се отбелязват със символа „Meta“ (M) и могат да бъдат въвеждани с клавишите „Esc“, „Alt“ или „Meta“ в зависимост от настройките на клавиатурата. "
|
||||
" Системата за отбелязване на бързи клавиши е следната: Комбинации с клавиша „Control“ се отбелязват с диакритичен символ (^) и могат да бъдат въвеждани с клавиша „Control“ (Ctrl) или с двойно натискане на клавиша „Escape“ (Esc). Комбинации с клавиша „Escape“ се отбелязват със символа „Meta“ (M) и могат да бъдат въвеждани с клавишите „Esc“, „Alt“ или „Meta“ в зависимост от настройките на клавиатурата. "
|
||||
|
||||
#: src/help.c:377
|
||||
msgid ""
|
||||
|
||||
6
po/ca.po
6
po/ca.po
@@ -8,7 +8,7 @@ msgstr ""
|
||||
"Project-Id-Version: nano 1.9.99pre0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-08-19 07:34-0400\n"
|
||||
"PO-Revision-Date: 2006-08-25 05:51+0200\n"
|
||||
"PO-Revision-Date: 2006-08-29 23:41+0200\n"
|
||||
"Last-Translator: Jordi Mallach <jordi@gnu.org>\n"
|
||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -1217,7 +1217,7 @@ msgstr "Arregla el problema de confusió del teclat numèric"
|
||||
|
||||
#: src/nano.c:765
|
||||
msgid "Don't add newlines to the ends of files"
|
||||
msgstr "No afegeixes línies en blanc al final dels fitxers"
|
||||
msgstr "No afegeixes retorns de carro al final dels fitxers"
|
||||
|
||||
#: src/nano.c:768
|
||||
msgid "Don't convert files from DOS/Mac format"
|
||||
@@ -1329,7 +1329,7 @@ msgstr "--fill=<#cols>"
|
||||
|
||||
#: src/nano.c:815
|
||||
msgid "Set wrapping point at column #cols"
|
||||
msgstr "Estableix l'amplada de tab a #cols columnes"
|
||||
msgstr "Estableix el punt d'ajustament a la columna #cols"
|
||||
|
||||
#: src/nano.c:818
|
||||
msgid "-s <prog>"
|
||||
|
||||
4
po/fr.po
4
po/fr.po
@@ -11,7 +11,7 @@ msgstr ""
|
||||
"Project-Id-Version: nano 1.9.99pre0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-08-19 07:34-0400\n"
|
||||
"PO-Revision-Date: 2006-08-28 00:52+0200\n"
|
||||
"PO-Revision-Date: 2006-10-16 23:32+0200\n"
|
||||
"Last-Translator: Jean-Philippe Guérard <jean-philippe.guerard@corbeaunoir.org>\n"
|
||||
"Language-Team: French <traduc@traduc.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -2168,7 +2168,7 @@ msgstr "--syntax=<cha
|
||||
# File: src/nano.c, line: 791
|
||||
#: src/nano.c:792
|
||||
msgid "Syntax definition to use for coloring"
|
||||
msgstr "Définition de la syntaxe de colorisation"
|
||||
msgstr "Définit la syntaxe de colorisation"
|
||||
|
||||
#
|
||||
# File: src/nano.c, line: 793
|
||||
|
||||
2286
po/pt_BR.po
2286
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
@@ -514,10 +514,7 @@ int nstrncasecmp(const char *s1, const char *s2, size_t n)
|
||||
break;
|
||||
}
|
||||
|
||||
if (n > 0)
|
||||
return tolower(*s1) - tolower(*s2);
|
||||
else
|
||||
return 0;
|
||||
return (n > 0) ? tolower(*s1) - tolower(*s2) : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1026,8 +1023,7 @@ bool is_valid_mbstring(const char *s)
|
||||
|
||||
return
|
||||
#ifdef ENABLE_UTF8
|
||||
use_utf8 ?
|
||||
(mbstowcs(NULL, s, 0) != (size_t)-1) :
|
||||
use_utf8 ? (mbstowcs(NULL, s, 0) != (size_t)-1) :
|
||||
#endif
|
||||
TRUE;
|
||||
}
|
||||
|
||||
@@ -194,6 +194,10 @@ void do_cut_text(
|
||||
cb_save->data -= cb_save_len;
|
||||
} else
|
||||
copy_from_filestruct(cutbuffer, cutbottom);
|
||||
|
||||
/* Set the current place we want to where the text from the
|
||||
* cutbuffer ends. */
|
||||
openfile->placewewant = xplustabs();
|
||||
}
|
||||
|
||||
/* Set NO_NEWLINES back to what it was before, since we're done
|
||||
|
||||
25
src/files.c
25
src/files.c
@@ -766,13 +766,11 @@ void do_insertfile(
|
||||
if (tmp == NULL)
|
||||
continue;
|
||||
|
||||
/* We have a file now. Indicate this. */
|
||||
free(answer);
|
||||
answer = tmp;
|
||||
|
||||
/* We have a file now. Indicate this and get out of the
|
||||
* statusbar prompt cleanly. */
|
||||
i = 0;
|
||||
do_prompt_abort();
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1164,9 +1162,9 @@ bool check_operating_dir(const char *currpath, bool allow_tabcomp)
|
||||
|
||||
fullpath = get_full_path(currpath);
|
||||
|
||||
/* fullpath == NULL means some directory in the path doesn't exist
|
||||
* or is unreadable. If allow_tabcomp is FALSE, then currpath is
|
||||
* what the user typed somewhere. We don't want to report a
|
||||
/* If fullpath is NULL, it means some directory in the path doesn't
|
||||
* exist or is unreadable. If allow_tabcomp is FALSE, then currpath
|
||||
* is what the user typed somewhere. We don't want to report a
|
||||
* non-existent directory as being outside the operating directory,
|
||||
* so we return FALSE. If allow_tabcomp is TRUE, then currpath
|
||||
* exists, but is not executable. So we say it isn't in the
|
||||
@@ -1825,12 +1823,9 @@ int do_writeout(bool exiting)
|
||||
if (tmp == NULL)
|
||||
continue;
|
||||
|
||||
/* We have a file now. Indicate this. */
|
||||
free(answer);
|
||||
answer = tmp;
|
||||
|
||||
/* We have a file now. Get out of the statusbar prompt
|
||||
* cleanly. */
|
||||
do_prompt_abort();
|
||||
} else
|
||||
#endif /* !DISABLE_BROWSER */
|
||||
#ifndef NANO_TINY
|
||||
@@ -2244,16 +2239,17 @@ char *input_tab(char *buf, bool allow_files, size_t *place, bool
|
||||
free(match2_mb);
|
||||
|
||||
mzero = charalloc(lastslash_len + common_len + 1);
|
||||
sprintf(mzero, "%.*s%.*s", lastslash_len, buf, common_len,
|
||||
matches[0]);
|
||||
|
||||
strncpy(mzero, buf, lastslash_len);
|
||||
strncpy(mzero + lastslash_len, matches[0], common_len);
|
||||
|
||||
common_len += lastslash_len;
|
||||
mzero[common_len] = '\0';
|
||||
|
||||
assert(common_len >= *place);
|
||||
|
||||
if (num_matches == 1 && is_dir(mzero)) {
|
||||
mzero[common_len] = '/';
|
||||
common_len++;
|
||||
mzero[common_len++] = '/';
|
||||
|
||||
assert(common_len > *place);
|
||||
}
|
||||
@@ -2383,6 +2379,7 @@ char *histfilename(void)
|
||||
strcpy(nanohist, homedir);
|
||||
strcpy(nanohist + homelen, "/.nano_history");
|
||||
}
|
||||
|
||||
return nanohist;
|
||||
}
|
||||
|
||||
|
||||
@@ -586,6 +586,8 @@ void parse_help_input(int *kbinput, bool *meta_key, bool *func_key)
|
||||
break;
|
||||
/* Cancel is equivalent to Exit here. */
|
||||
case NANO_CANCEL_KEY:
|
||||
case 'E':
|
||||
case 'e':
|
||||
*kbinput = NANO_EXIT_KEY;
|
||||
break;
|
||||
}
|
||||
|
||||
12
src/nano.c
12
src/nano.c
@@ -49,8 +49,8 @@ static struct termios oldterm;
|
||||
static struct sigaction act;
|
||||
/* For all our fun signal handlers. */
|
||||
|
||||
/* Create a new filestruct node. Note that we specifically do not set
|
||||
* prevnode->next equal to the new line. */
|
||||
/* Create a new filestruct node. Note that we do not set prevnode->next
|
||||
* to the new line. */
|
||||
filestruct *make_new_node(filestruct *prevnode)
|
||||
{
|
||||
filestruct *newnode = (filestruct *)nmalloc(sizeof(filestruct));
|
||||
@@ -1088,10 +1088,6 @@ RETSIGTYPE handle_sigwinch(int signal)
|
||||
COLS = win.ws_col;
|
||||
LINES = win.ws_row;
|
||||
|
||||
/* Just in case we're in the statusbar prompt, reset the statusbar
|
||||
* cursor position. */
|
||||
do_prompt_abort();
|
||||
|
||||
/* If we've partitioned the filestruct, unpartition it now. */
|
||||
if (filepart != NULL)
|
||||
unpartition_filestruct(&filepart);
|
||||
@@ -2241,6 +2237,10 @@ int main(int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Just in case we were at the statusbar prompt, make sure the
|
||||
* statusbar cursor position is reset. */
|
||||
do_prompt_abort();
|
||||
|
||||
/* If constant cursor position display is on, and there are no
|
||||
* keys waiting in the input buffer, display the current cursor
|
||||
* position on the statusbar. */
|
||||
|
||||
15
src/prompt.c
15
src/prompt.c
@@ -224,10 +224,12 @@ int do_statusbar_input(bool *meta_key, bool *func_key, bool *s_or_t,
|
||||
|
||||
do_statusbar_verbatim_input(&got_enter);
|
||||
|
||||
/* If we got the Enter key, set input to the
|
||||
* key value for Enter, and set finished to
|
||||
* TRUE to indicate that we're done. */
|
||||
/* If we got the Enter key, remove it from
|
||||
* the input buffer, set input to the key
|
||||
* value for Enter, and set finished to TRUE
|
||||
* to indicate that we're done. */
|
||||
if (got_enter) {
|
||||
get_input(NULL, 1);
|
||||
input = NANO_ENTER_KEY;
|
||||
*finished = TRUE;
|
||||
}
|
||||
@@ -1247,10 +1249,13 @@ int do_prompt(bool allow_tabs,
|
||||
}
|
||||
|
||||
/* This function forces a reset of the statusbar cursor position. It
|
||||
* should only be called after do_prompt(), and is only needed if we
|
||||
* leave the prompt via something other than Cancel or Enter. */
|
||||
* should be called when we get out of all statusbar prompts. */
|
||||
void do_prompt_abort(void)
|
||||
{
|
||||
/* Uninitialize the old cursor position in answer. */
|
||||
old_statusbar_x = (size_t)-1;
|
||||
old_pww = (size_t)-1;
|
||||
|
||||
reset_statusbar_x = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,10 +254,12 @@ int *get_input(WINDOW *win, size_t input_len)
|
||||
#endif
|
||||
|
||||
if (key_buffer_len == 0) {
|
||||
if (win != NULL)
|
||||
if (win != NULL) {
|
||||
get_key_buffer(win);
|
||||
|
||||
if (key_buffer_len == 0)
|
||||
if (key_buffer_len == 0)
|
||||
return NULL;
|
||||
} else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user