Commit Graph

366 Commits (3d6dcb956804d3e9e5ed12597596478180c35afb)

Author SHA1 Message Date
Benno Schulenberg d42f71a2ef tweaks: avoid a few needless reallocations
Most of these variables are freed moments later -- reallocating
them is thus a waste of time.
2017-03-20 13:07:57 +01:00
Benno Schulenberg fd0589d8bc tweaks: remove the cluttering conditional compilation of a parameter
The conditionalizing saved negligible amounts of space, of memory, and
of speed.
2017-01-03 14:11:45 +01:00
Benno Schulenberg 908663e8fc input: discard a verbatim 0x0A or 0x00 byte, depending on the mode
This disallows entering a verbatim ^J (0x0A) when typing text or
search terms, and disallows a verbatim ^@ (0x00) when typing a
filename.  Nano beeps when the disallowed code is attempted.

This addresses https://savannah.gnu.org/bugs/?49897.
2016-12-27 16:46:09 +01:00
Benno Schulenberg 1fb820386b tweaks: chuck a special case, and reduce the scope of two variables
A KEY_WINCH does not need to be separately treated since the basic
action for anything that is not recognized at the yes-no prompt is:
to continue.
2016-12-26 20:25:06 +01:00
Benno Schulenberg 9973366685 prompt: represent newlines as ^J instead of breaking the bar
Also at the yes-no prompt, a 0x0A byte should be displayed as a ^J
instead of splitting the prompt bar in two and spreading it over
two lines.

This fixes https://savannah.gnu.org/bugs/?49934.
2016-12-26 19:59:51 +01:00
Benno Schulenberg 8bf8682b17 binding: use the code for the Enter directly instead of a function call
And certainly don't return zero when the key wouldn't have been found,
because that would have meant jumping a word to the right.
2016-12-22 12:13:03 +01:00
Benno Schulenberg a9b5a0e029 tweaks: rename a function to something less abbrevy
Also, swap the logic around, to use less braces.
2016-12-22 12:04:10 +01:00
Benno Schulenberg 1144d38316 tweaks: don't bother reallocating a string of which there is only one
And which normally is just some ten or twenty characters long, and
never gets wildly overallocated.
2016-12-18 10:28:30 +01:00
Benno Schulenberg 86121cf3fc tweaks: move a cursor-on switch to a more logical place (again)
But do it correctly this time: don't switch it on when replacing.
2016-12-05 15:47:44 +01:00
Benno Schulenberg 379b1556ed prompt: remove two fragments of dead code
None of the prompts offer a total-refresh shortcut -- only the
edit window, the help viewer, and the file browser provide this.
2016-12-04 12:34:56 +01:00
Benno Schulenberg 656563beda screen: don't restore the previous menu after a yesno prompt
There is no need for that -- it just causes flicker.

This fixes https://savannah.gnu.org/bugs/?49742.
2016-12-01 15:54:56 +01:00
Benno Schulenberg 8f95f9b1aa tweaks: reshuffle three initializations and trim some comments 2016-12-01 15:28:59 +01:00
Benno Schulenberg c6512a9717 screen: don't request an update of the edit window for every yesno prompt
Only when doing replacements does the edit window need a refresh: for
every new spotlight.  So, do the update request in the latter routine.
2016-12-01 15:20:05 +01:00
Benno Schulenberg ac41587d4e oops: the yesno prompt for replacing does not want a visible cursor 2016-11-30 13:47:50 +01:00
Benno Schulenberg 72e8bcb027 tweaks: move a switching on of the cursor to a more logical place 2016-11-30 11:11:06 +01:00
Benno Schulenberg 2dffcf101f tweaks: fix compilation with --disable-histories 2016-08-30 11:14:19 +02:00
Benno Schulenberg c11c688420 tweaks: fix compilation with --enable-tiny again 2016-08-30 09:36:49 +02:00
Benno Schulenberg 514cd9a099 update the license text to the preferred version
Mentioning "GNU nano" instead of "This program" and referring to the
website instead of to a postal address.
2016-08-29 21:27:16 +02:00
Benno Schulenberg 406e5242a3 update the copyright notices 2016-08-29 21:27:05 +02:00
Benno Schulenberg 0242d84218 tweaks: make a call in one place instead of in four different ones
And remove a superfluous call.
2016-08-28 21:27:52 +02:00
Benno Schulenberg 7275e11c4f tweaks: adjust some comments and remove needless asserts 2016-08-28 18:17:10 +02:00
Benno Schulenberg 77d140728d tweaks: don't bother trimming the prompt again
The prompt has already been trimmed in do_prompt() to fit into the
available space.
2016-08-28 17:53:44 +02:00
Benno Schulenberg 4d2ada60f5 tweaks: don't bother avoiding unneeded rewrites of the promptbar
Leave the optimization of actual screen writes to ncurses.
2016-08-28 17:37:25 +02:00
Benno Schulenberg 6ad3700a3d prompt: mouse clicks that moved the cursor need no further processing
This fixes https://savannah.gnu.org/bugs/?48917.
2016-08-27 12:00:08 +02:00
Benno Schulenberg 4f156aa6db prompt: set up the prepared answer before allowing to change it
This fixes https://savannah.gnu.org/bugs/?48916.
2016-08-27 11:59:57 +02:00
Benno Schulenberg 6142ef87b5 prompt: use angular brackets as continuation mark, as Pico does
The $ sign looks too much like an S, and it "obscures" the answer by
being so "massive".  The < and > signs are lighter and work better.
2016-08-27 09:34:54 +02:00
Benno Schulenberg da2fce90bd tweaks: elide a variable and rename some others 2016-08-27 09:34:42 +02:00
Benno Schulenberg 1e3cffbbd6 prompt: show a trailing $ when the tail of the answer is offscreen
This fixes https://savannah.gnu.org/bugs/?48894.
2016-08-26 21:42:23 +02:00
Benno Schulenberg 92c97c70d4 prompt: leave always at least the last character of the answer visible
This fixes https://savannah.gnu.org/bugs/?48912.
2016-08-26 21:32:07 +02:00
Benno Schulenberg b77b1391c3 tweaks: improve some indentation and reshuffle a few lines 2016-08-26 12:24:18 +02:00
Benno Schulenberg 7e0c4e5726 tweaks: rename a function and adjust indentation 2016-08-25 20:20:50 +02:00
Benno Schulenberg 50616148b0 prompt: recompose the statusbar text whenever the window size changes
This fixes https://savannah.gnu.org/bugs/?48796.
2016-08-25 20:12:36 +02:00
Benno Schulenberg 2f9232a493 tweaks: adjust indentation after previous change 2016-08-25 11:45:38 +02:00
Benno Schulenberg 0d5fbfb91c tweaks: reshuffle some things, and remove a misplaced comment 2016-08-25 11:45:34 +02:00
Benno Schulenberg 56147434f3 prompt: don't crash when the terminal is less than four columns wide
This fixes https://savannah.gnu.org/bugs/?48792.
2016-08-25 11:45:13 +02:00
Benno Schulenberg c22cd03f18 prompt: work around a VTE bug by outdancing an ncurses optimization
This fixes https://savannah.gnu.org/bugs/?48852.
2016-08-25 10:46:28 +02:00
Benno Schulenberg bd1fcc5fe2 tweaks: correct one comment, and adjust another 2016-08-06 12:17:24 +02:00
Benno Schulenberg 90a90365a8 tweaks: rename three constants, for clarity, and hardcode two others 2016-08-01 12:56:05 +02:00
Benno Schulenberg 9cd30d4917 tweaks: don't bother setting meta_key to false when a key is invalid
That is a task for the key-getting routine.
2016-07-31 18:32:18 +02:00
Benno Schulenberg cb10b2b908 tweaks: elide the global variable 'func_key'
There is no need to specially flag a function key or editing key --
the keycode is indication enough in itself: outside of byte range.
2016-07-31 18:13:05 +02:00
Benno Schulenberg 4cff67fdde tweaks: adjust indentation after the previous change, and edit comments 2016-07-25 12:50:03 +02:00
Benno Schulenberg aefe26d216 tweaks: factor out a common condition 2016-07-25 12:31:40 +02:00
Benno Schulenberg 8eb99e2a1d tweaks: put similar things together 2016-07-25 12:18:40 +02:00
Benno Schulenberg 960e848cc7 tweaks: elide a typedef, as it now has just one element 2016-07-12 09:35:48 +02:00
Benno Schulenberg 8507dd4bd0 color: integrate the hilite attribute into the pair number
Color-pair numbers and attributes can be OR'd together -- do so,
to save an attron() call whenever the hilite is on.
2016-07-12 09:20:09 +02:00
Benno Schulenberg 528b79b5f3 tweaks: rename a variable to be more accurate
When we get a ^J as verbatim input, it is not possible to include it
into the file buffer or the prompt answer, because this would mean
adding an encoded null to the buffer or answer, and that is not what
the user intended.  One option would have been to simply ignore a ^J
in verbatim input.  But the choice has been made to act the same way
as when the ^J (0x0A) is found in the file data: start a new line.

That is the same response as to the Enter key, yes -- but the code
for the Enter key is ^M (0x0D), not ^J.  So, to be more precise,
rename the relevant variable from 'got_enter' to 'got_newline'.
2016-07-03 16:19:27 +02:00
Benno Schulenberg 9106cc8ecc main: let the main loop restore the main menu, if needed
Don't make it the responsibility of the executed functions to restore
the list of shortcuts of the edit window.  Just detect whether another
menu was displayed, and if so, redisplay the main menu.
2016-06-21 11:03:38 +02:00
Benno Schulenberg 17cf833b9c tweaks: normalize some whitespace 2016-05-30 09:09:36 +02:00
Benno Schulenberg 1d3d30776a tweaks: more consistently use * instead of [0] when checking for '\0' 2016-05-27 21:31:55 +02:00
Benno Schulenberg 30f3c53305 tabbing: refresh the window also when Goto-Dir in browser was cancelled
This restores things to the way they were before commit 36ec76a.
Apparently all those refreshes are needed in some cases after all.
2016-04-26 17:55:56 +02:00
Benno Schulenberg 41ed690791 tabbing: refresh the edit window in case a previous tab listed names
Commit 36ec76a made the wrong change: after a tab that did not list any
file names on the screen, a refresh /is/ needed, because a previous tab
might have listed things on the screen.  But at the end of the prompt,
it is not necessary to refresh the edit window if things were listed,
because the window will be refreshed anyway after reading in a file.
2016-04-23 15:46:31 +02:00
Benno Schulenberg 36ec76a508 tabbing: don't refresh the edit window when nothing was printed on it
This is a remnant from 2001, when things were different.  Now, there
is no need to refresh the edit window when tabbing produced no list.
When it did produce a list, it is cleared off later.
2016-04-17 18:12:53 +02:00
Benno Schulenberg 34a20f8839 prompt: properly save and restore the x position in the statusbar
This fixes https://savannah.gnu.org/bugs/?47720.
2016-04-17 15:24:05 +02:00
Benno Schulenberg d92eb4fee3 all: eradicate SVN's $Id$ tags 2016-04-05 14:59:12 +02:00
Benno Schulenberg 532d73ccc7 Renaming a variable to better indicate booleanness.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5779 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-03-30 12:27:06 +00:00
Benno Schulenberg 8a2dd978f8 Renaming a variable, for contrast and correctness.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5670 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-23 08:31:57 +00:00
Benno Schulenberg 27e1e83e8c As the charmove() already copies the terminating null byte,
there is no need to put one in.  Just trim the allocation.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5666 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 16:51:39 +00:00
Benno Schulenberg 3ed08c568f Eliding a variable -- there is no need to optimize for calls of strlen(),
as this is typing speed, no need to hurry.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5663 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 14:26:05 +00:00
Benno Schulenberg 7c0e433305 Not moving too many bytes -- that is: not moving them beyond the
allocated buffer.  This fixes Savannah bug #47219.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5662 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-22 13:17:53 +00:00
Benno Schulenberg acf19bde22 Reducing an allocation to what is actually needed.
This undoes the papering-over of the just-fixed bug.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5655 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-20 16:35:09 +00:00
Benno Schulenberg e86dc0381c Avoiding a memory leak when tabbing on a string that doesn't occur in the
history.  This fixes Savannah bug #47124 reported by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5653 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-20 12:16:43 +00:00
Benno Schulenberg e540053eb3 Renaming and condensing some stuff, and correcting the main comment,
because 'allow_cntrls == FALSE' meant that controls were being filtered.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5644 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 12:03:47 +00:00
Benno Schulenberg ef16a2a250 Doing the copying of typed stuff from input to output just once.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5643 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-14 11:16:54 +00:00
Benno Schulenberg 568d2a389c Switching the cursor on and off at the appropriate moments (that is: when
needed), so that it no longer shows in the help screen nor in the file list.
This fixes Savannah bug #47126.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5640 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-13 19:41:12 +00:00
Benno Schulenberg e853c1ee7c Renaming a variable for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5620 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 13:41:46 +00:00
Benno Schulenberg e5fee7e649 Normalizing a bit of indentation.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5619 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-07 13:37:16 +00:00
Benno Schulenberg 22a01cad9e Rewrapping some lines and removing some useless comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5614 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 12:12:08 +00:00
Benno Schulenberg 8585bf2dd4 Avoiding to update the statusbar twice for a Backspace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5613 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:50:57 +00:00
Benno Schulenberg 2cfa96bde9 Renaming 'update_bar_if_needed()' for more contrast and aptness.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5612 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:44:33 +00:00
Benno Schulenberg d844f05a1e Chopping two parameters that are always the same, and that are
global variables anyway.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-02-06 11:40:15 +00:00
Benno Schulenberg 7ade5deabe Making Home go always fully home.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5604 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-31 13:26:15 +00:00
Benno Schulenberg a93a11eb42 Using a simpler algorithm for jumping to the next word.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 10:31:16 +00:00
Benno Schulenberg 5688c160a9 Jumping to the start of the current word, not to that of the preceding one.
This fixes Savannah bug #46970.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5594 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 10:10:20 +00:00
Benno Schulenberg 65c7c810bc Adjusting some indentation and some line wrapping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5593 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-26 09:16:09 +00:00
Benno Schulenberg 87460b5998 Eliding another small function that is used only once.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5588 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 21:02:09 +00:00
Benno Schulenberg decee32067 Eliding an unneeded function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5587 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 20:44:39 +00:00
Benno Schulenberg f01dd29f48 Bundling four statements (that in total occur seven times)
into a separate function.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5586 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 20:36:02 +00:00
Benno Schulenberg 53c8ada24b Removing a superfluous free.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5585 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 16:04:25 +00:00
Benno Schulenberg eed1aab3f0 Chopping an always-FALSE parameter and deleting an unused return value.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5584 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-24 15:42:45 +00:00
Benno Schulenberg a443760d80 Eliding an unneeded variable.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5578 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-21 18:29:39 +00:00
Benno Schulenberg 7a1709f03b Removing a now unneeded function, as nothing can break out of do_prompt()
any more, not a SIGWINCH either.  And deleting an always-FALSE 'if'.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5577 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-21 18:23:17 +00:00
Benno Schulenberg aa7edb7fc2 Preserving the cursor position on the statusbar when just toggling
a setting or making an excursion to the file browser.
This fixes Savannah bug #46945.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-21 17:29:37 +00:00
Benno Schulenberg 34fbb1f4de Adjusting a few comments and rewrapping some lines.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-13 20:32:40 +00:00
Benno Schulenberg dd29c56993 Rewriting the loop, and constifying the input of sctofunc().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2016-01-04 09:52:43 +00:00
Benno Schulenberg bde996db67 Discarding a now useless function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5403 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-11 19:56:35 +00:00
Benno Schulenberg c32a58a826 Not checking for non-NULL before freeing a variable, as it's unnecessary.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5249 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-14 19:14:41 +00:00
Benno Schulenberg 40bfc729ca Preventing a floating-point exception when the available length
for an answer becomes zero.  The answer will instead wrap to the
next line, which does not look nice but is better than crashing.
Patch by Mahyar Abbaspour.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5235 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-31 08:45:17 +00:00
Benno Schulenberg 2661d6d397 Using 'width' instead of hardcoded 16. And doing things in the same order
for all three cases: setting the string and then positioning the cursor.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5230 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-28 13:51:03 +00:00
Benno Schulenberg 59187b8051 Normalizing the whitespace after the recent changes in logic.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5229 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-28 13:28:37 +00:00
Benno Schulenberg 75d64e677e Handling a SIGWINCH (which signals a change in window size) not when it
happens but only when checking for keyboard input.  It now reports the
SIGWINCH via a special key value to the calling routine, to allow not
only the main editor but also the help viewer and the file browser to
adapt their display to the new size.
Patch by Mahyar Abbaspour, somewhat edited by Benno.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5228 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-28 13:02:29 +00:00
Benno Schulenberg ec0e0235fa Renaming a function to the simpler 'need_statusbar_update()'
as there is no vertical counterpart.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5208 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-20 08:35:41 +00:00
Benno Schulenberg d8b6dbfffe Letting bottombars() set the global variable 'currmenu'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5183 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 14:16:07 +00:00
Benno Schulenberg cf9f32b009 Reordering a few things, and adjusting some whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5086 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-31 20:49:32 +00:00
Benno Schulenberg 266e0496ab Using the more direct func_from_key() wrapper instead of get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5082 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-27 19:32:03 +00:00
Benno Schulenberg 3933a30c9e Adding a typedef for a pointer to a function: functionptrtype.
And starting to use this to make the code a bit cleaner.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5050 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 08:47:09 +00:00
Benno Schulenberg ebcc68f51d Grouping the arguments better.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5046 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 11:50:35 +00:00
Benno Schulenberg 645841fd25 Not passing the menu but setting it earlier.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5045 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 11:42:28 +00:00
Benno Schulenberg 49816fed70 Now that 'currmenu' is really global, stop passing it around.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5043 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-01 10:41:10 +00:00
Benno Schulenberg 7e5324d164 Making 'meta_key' and 'func_key' into global variables, instead of
having them declared everywhere and passing them around endlessly.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5039 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 18:04:33 +00:00
Benno Schulenberg d4623f3ca3 Eradicating the execute flag -- it is almost always TRUE, and when it's FALSE
then it's for a function that is an empty placeholder, so executing it will
not do anything anyway.  Handling the one exception (do_gotolinecolumn_void)
specially, just like the other one (do_cancel) already is.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5029 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-28 14:42:18 +00:00
Benno Schulenberg b5895f0a51 Removing the useless parameters 'have_shortcut and 'allow_funcs'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5028 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-28 08:29:18 +00:00
Benno Schulenberg 26de2dd843 Normalizing some indentation and whitespace.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5025 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 20:01:27 +00:00
Benno Schulenberg 29dfb68b6e Removing the ability to search for a matching bracket in a prompt input line.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5024 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-27 19:32:12 +00:00
Benno Schulenberg b341f29cbd Transform many DISABLE_NANORC #ifdefs to the new DISABLE_HISTORIES.
This completes the fix for Savannah bug #42539.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4989 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 20:05:24 +00:00
Benno Schulenberg a8a23abc00 Making a couple of minimalistic whitespace adjustments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4954 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-10 19:12:14 +00:00
Benno Schulenberg 044e4d2ae0 A few more comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4878 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-13 21:11:59 +00:00
Benno Schulenberg e7d6e55332 Making it possible for interface-foreground colours to be bright.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-10 19:15:04 +00:00
Benno Schulenberg 1663994e42 Adding the ability to colour four elements of nano's interface differently.
Idea and original patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4827 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-03 18:24:45 +00:00
Benno Schulenberg 7a9f4a456e Update the years in the copyright notices.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4826 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-30 20:18:26 +00:00
Benno Schulenberg 5bd359dbb9 Normalizing whitespace around '==' comparison.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4776 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-15 15:02:43 +00:00
Benno Schulenberg 8f6151198a Whitespace adjustments, plus a few comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4769 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:57:06 +00:00
Benno Schulenberg 7828a8096e Removing the unused parameter 'func_key' from get_shortcut().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4768 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-14 09:22:29 +00:00
Benno Schulenberg d19be5aafa More editing of comment blocks and trimming of blank lines.
Patch by David Lawrence Ramsey, slightly tweaked.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4753 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-08 18:38:45 +00:00
Benno Schulenberg 96c95cd6a1 Normalizing the indentation somewhat.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4729 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 19:26:08 +00:00
Benno Schulenberg 062bca7c41 Fixing compilation with --enable-tabcomp and tiny.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4728 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-04-04 19:21:56 +00:00
Benno Schulenberg a65ef4244c Removing stray spaces before tabs.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4652 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-17 21:36:37 +00:00
Chris Allegretta 637daa85c5 * src/*: Retire iso_me_harder_funcmap based on suggestion by <bernd.spaeth@gmx.net>
This does add 20KB to nano's executable size but it gets rid of a lot of indirection
          that makes people stomach turn.  There are several new stub functions and need of more
          tidying as a result of this.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4527 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2011-02-07 14:45:56 +00:00
Chris Allegretta b916f5cd8b 2010-01-17 Chris Allegretta <chrisa@asty.org>
* nano.c (main), prompt.c (do_statusbar_input): Handle problems with an unmapped 
          function due to key rebinding, fixes crashes on FreeBSD repoted by Eitan 
          Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4475 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2010-01-17 05:30:22 +00:00
Chris Allegretta 8a07a96eef 2009-12-01 David Lawrence Ramsey <pooka109@gmail.com>
* Update documentation for 2.2 features including sample nanorc file, texinfo
          file, man pages, UPGRADE file, and update copyright noticed for the current year.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4453 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-12-02 03:36:22 +00:00
Chris Allegretta 5a018f0d3a 2009-11-29 Chris Allegretta <chrisa@asty.org>
* prompt.c (get_prompt_string) - Universally handle help key when is disabled.  Fixes Savannah
          bug 28117 by David Lawrence Ramsey <pooka109@gmail.com>.
        * chars.c, files.c: Add junk vars to silence the compiler.  Sigh.

2009-11-29 David Lawrence Ramsey <pooka109@gmail.com>
        * Change several *chars to const char, additional cleanups and casts to make compilers happier.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4448 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-29 06:13:22 +00:00
Chris Allegretta 879dfbaf40 * prompt.c (update_statusbar_line): Set statusbar_pww when updating the line.
Fixes Savannah bug 24957 by Mike Frysinger.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4434 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-21 17:12:28 +00:00
Chris Allegretta 6f08332741 2009-11-11 Chris Allegretta <chrisa@asty.org>
* winio.c: Large tweaking of cursor and text display based on COLS not COLS - 1,
          due to finally understanding that display_string wasn't being called properly
          when softwrap was enabled.  Fixes Savnnah bug 27603, Return key doesn't scroll
          viewport reported by Hannes Schueller.
        * - Fix size_t formatting issues with -pedantic by converting vals to long unsigned
          for printing.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4420 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-11-11 06:00:33 +00:00
Chris Allegretta a117163a4c 2009-01-19 Chris Allegretta <chrisa@asty.org>
* Change funcion definitions to shorts instead of (void *)s.  New mapping function
          iso_me_harder_funcmap().  Fixes compilation complaints with -pedantic, 
          reported by Eitan Adler <eitanadlerlist@gmail.com>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4349 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2009-01-19 19:10:39 +00:00
Chris Allegretta 1b6ed07543 Add a fix for bug #23144 that actually works (several bugs in one here)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-06-03 08:09:05 +00:00
Chris Allegretta cc593839aa Fix for 106305: unable to ctrl+c out of save when exiting
Add new YESNO menu for calls to do_yesno_prompt, to enable cancel.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-19 02:32:48 +00:00
Chris Allegretta 10f868d33c - Update man page a little bit more
- Change do_prompt and get_prompt_line to pass meta_key and func_key
  so the calling program can DTRT when it calsl get_shortcut.  In
  particular this allows the "new file buffer" toggle on the insert file
  menu to work, and presumably other rebinding stuff should now work also.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4226 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-14 04:08:51 +00:00
Chris Allegretta 0018d8ed6f - Fix tiny mode again after breaking it again
- Resurrect IFSCHELP to get rid of some needless help message stubs
- Add support for rebinding the suspend key
- Fix wrong refresh help message


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4224 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-13 08:23:52 +00:00
Chris Allegretta eb64314f8b Convert more code to use new backend. Add some more sentinel strings
for enter and backspace keys in case their control key alternates get
rebound.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4223 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-12 04:44:14 +00:00
Chris Allegretta 79a33bb38d New keybindings code and backend. New structs subnfunc for menu functions
and toggles and sc for shortcut keys, old 'shortcut' and 'toggles' structs are
gone.  The current implementation has a bunch of broken stuff (some of which is
documented in BUGS).  Updated nanorc.5 with some mostly complete documentation
on configuring.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2008-03-05 07:34:01 +00:00
David Lawrence Ramsey 281a469442 fix minor display and cursor placement problems when scrolling between
pages at the statusbar prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4189 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-08 07:00:27 +00:00
David Lawrence Ramsey 98958e83c9 per OBATA Akio's patch with a few tweaks by me, add wnoutrefresh() calls
after reset_(statusbar_)?cursor() calls, to ensure that the cursor is
placed properly when using NetBSD curses


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4185 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-04 16:38:47 +00:00
David Lawrence Ramsey a9c0000ada still more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4184 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-12-03 20:14:18 +00:00
David Lawrence Ramsey d8a1d37161 update copyright notices, as Chris Allegretta's copyrights have now been
assigned to the Free Software Foundation; also, make copyright notices
consistent in style


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4173 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-11 05:01:32 +00:00
David Lawrence Ramsey c9694b7636 update copyright notices, as my copyrights have now been assigned to the
Free Software Foundation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4172 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-10-05 16:44:45 +00:00
David Lawrence Ramsey d0035b4ab2 convert to GPLv3 or later
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4147 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-08-11 05:17:36 +00:00
David Lawrence Ramsey 1904f51fb5 more cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4120 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-07-01 21:33:17 +00:00
David Lawrence Ramsey 23a4e433bd in do_yesno_prompt(), remove redundant check for NO_HELP's being FALSE
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4118 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-06-30 21:19:42 +00:00
David Lawrence Ramsey ebc38fd106 further simplify processing of mouse events by consolidating if clauses
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4113 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-06-28 16:00:50 +00:00
David Lawrence Ramsey bc65313104 more various mouse support-related simplifications
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4109 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-22 17:20:28 +00:00
David Lawrence Ramsey 3a5eaeb401 various mouse support-related simplifications, improvements, and fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4107 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-05-20 23:41:56 +00:00
David Lawrence Ramsey ea8f3c5271 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4091 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-04-21 18:53:38 +00:00
David Lawrence Ramsey 6335fb54d5 miscellaneous comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4012 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2007-01-01 05:15:32 +00:00
David Lawrence Ramsey 4fd1ca07a7 more comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3976 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 05:09:16 +00:00
David Lawrence Ramsey 81371020bb revert erroneous changes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3973 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 04:56:16 +00:00
David Lawrence Ramsey 50d78a6f9a don't allow filenames entered at the "Write File" prompt or the "Insert
File" prompt to contain nulls


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3971 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-27 02:41:59 +00:00
David Lawrence Ramsey cb801d63a3 cosmetic copyright notice fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3950 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-10 02:47:11 +00:00
David Lawrence Ramsey 4967eb8fc0 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3936 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-11-07 21:08:17 +00:00
David Lawrence Ramsey b9f007430b in 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


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3882 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-09-29 15:45:10 +00:00
David Lawrence Ramsey 3879528945 make sure that the statusbar cursor position is always properly reset
when we get out of all statusbar prompts


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3865 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-29 20:54:38 +00:00
David Lawrence Ramsey fa38795ef5 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3854 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-26 16:50:51 +00:00
David Lawrence Ramsey e1e2cb7064 simplify, and add comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3853 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-26 16:42:12 +00:00
David Lawrence Ramsey 98332d40dc properly preserve the cursor position when going from the "Read File" or
"Save File As" prompt to the file browser to the "Go To Directory"
prompt, and then canceling back to the "Read File" or "Save File As"
prompt


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3850 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-08-26 15:14:55 +00:00
David Lawrence Ramsey b159f941e8 per Benno Schulenberg's patch with a few additions by me, fix
punctuation relating to "i.e." in comments and documentation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3821 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-28 17:06:27 +00:00
David Lawrence Ramsey 23994bd8a0 miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3797 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-19 13:34:55 +00:00
David Lawrence Ramsey 51b7b0e7d8 in browser_refresh() and titlebar(), don't display overly long filenames
with ellipses if the number of columns is extremely small; also, in
certain places, call wnoutrefresh(bottomwin) after calling
blank_statusbar(), in order to ensure that the statusbar is actually
blanked


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3751 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-07-05 06:38:47 +00:00
David Lawrence Ramsey 6c8f92c092 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3688 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-28 23:27:07 +00:00
David Lawrence Ramsey 106c1bf3d1 beep when we get an unhandled shortcut or toggle, as Pico does
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3616 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-03 19:36:02 +00:00
David Lawrence Ramsey 5031ddf8ea don't display "Unknown Command" after a mouse click
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3611 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-02 03:09:27 +00:00
David Lawrence Ramsey 1f5cf0d111 redundancy fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3597 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-06-01 01:15:06 +00:00
David Lawrence Ramsey 6fb6689f0f various input/output fixes: allow normal typing of high-bit control
characters, as Pico does; in do_verbatim_input(), unconditionally blank
the statusbar as soon as we're finished getting input; and in
parse_verbatim_kbinput(), don't include the ability to enter a Unicode
sequence via verbatim input mode if ENABLE_UTF8 isn't defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3584 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-27 17:39:19 +00:00
David Lawrence Ramsey d6eb17515d in parse_kbinput(), if we get Escape followed by an escape sequence,
interpret the escape sequence for consistency; also ignore unhandled
function keys for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3565 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-25 21:39:25 +00:00
David Lawrence Ramsey c7251fa4fc comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3563 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 21:12:08 +00:00
David Lawrence Ramsey 0b65402b60 fix more breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3560 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 20:39:03 +00:00
David Lawrence Ramsey 305d889e9d more cleanly ignore unhandled meta key sequences and escape sequences;
to get this to work properly, add a shortcut for moving to the next
search/replace string


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3559 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 19:48:03 +00:00
David Lawrence Ramsey b4428a0268 fix breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3556 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 18:10:41 +00:00
David Lawrence Ramsey 592f46bf35 capitalization fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3555 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 17:37:39 +00:00
David Lawrence Ramsey 8e341e1b22 ignore unhandled meta key sequences and escape sequences, and indicate
it on the statusbar when we get an unhandled shortcut or toggle, as Pico
does


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3554 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-24 17:36:00 +00:00
David Lawrence Ramsey 60edb0a989 improve NANO_REFRESH_KEY handling
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3520 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-15 15:17:50 +00:00
David Lawrence Ramsey c1c818ebd5 comment and formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3516 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-14 18:22:01 +00:00
David Lawrence Ramsey f5d6d9985b drop the Meta-] and Meta-[ aliases for Meta-} and Meta-}, and change the
shortcut to find the matching bracket from Ctrl-] back to Meta-], since
Ctrl-] is used as the telnet escape key


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3503 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-12 12:37:53 +00:00
David Lawrence Ramsey bbabf9562a fix bracket matching breakage in do_statusbar_input() since its shortcut
was changed to Ctrl-]


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3499 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-11 00:58:26 +00:00
David Lawrence Ramsey d29e861376 in do_(statusbar_)?input(), remove redundant check for allow_funcs'
being TRUE when we get KEY_MOUSE


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3494 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-10 13:06:58 +00:00
David Lawrence Ramsey 8992d0adaa formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3493 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-10 12:48:47 +00:00
David Lawrence Ramsey 5f274c4b49 handle NANO_CONTROL_8 even better by doing it in parse_kbinput()
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3452 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-28 19:27:41 +00:00
David Lawrence Ramsey fbf46a5d88 in do_(statusbar_)?input(), if we get NANO_CONTROL_8, handle it instead
of ignoring it, for consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3451 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-28 18:59:34 +00:00
David Lawrence Ramsey fcff1e7401 cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3430 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-25 02:35:33 +00:00
David Lawrence Ramsey bc80cb1ba7 readd the Cancel -> Exit aliases for the file browser and help browser,
per Benno Schulenberg's suggestion, and clean up a few other
miscellaneous things


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3428 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-24 23:03:21 +00:00
David Lawrence Ramsey 891e0ec281 in get_prompt_string(), include the handling of the help key even when
help is disabled, so that we aren't erroneously kicked out of the
statusbar prompt under any circumstances


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3420 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-23 19:32:50 +00:00
David Lawrence Ramsey 4d72de73b1 add the ability to use bold text instead of reverse video text, via the
-D/--boldtext command line option and the "boldtext" rcfile option, and
reduce USE_UTF8 to a static bool in chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3368 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 15:27:40 +00:00
David Lawrence Ramsey 61a70388fe remove inaccurate comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3367 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-12 14:34:08 +00:00
David Lawrence Ramsey cde9039335 change translator-specific comments in global.c and prompt.c so that
they show up in nano.pot


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3365 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-09 18:27:42 +00:00
David Lawrence Ramsey be7fd8a9be clarify a comment
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3364 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-04-09 18:24:54 +00:00
David Lawrence Ramsey 6816007242 make sure browser_refresh() is used when refreshing or doing tab
completion at the prompt in the file browser


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3296 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-18 21:32:29 +00:00
David Lawrence Ramsey 8326254643 go back to using a while loop in get_prompt_string(), as it's simpler
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3291 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 22:42:14 +00:00
David Lawrence Ramsey 162ed2af24 in get_prompt_string(), initialize finished to FALSE so that the
do/while loop works properly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3290 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 22:35:04 +00:00
David Lawrence Ramsey 3326603341 in get_prompt_string(), redraw the prompt and set finished to FALSE when
NANO_HELP_KEY is pressed, so that we don't leave the prompt, enter the
help browser, and restart the prompt after leaving it; this will
properly preserve the cursor position after doing the last of these


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3289 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-09 21:43:14 +00:00
David Lawrence Ramsey 591c409f3f in get_prompt_string(), use a do/while loop instead of a while loop, for
consistency


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3287 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-08 20:14:49 +00:00
David Lawrence Ramsey 9d8c284135 allow tab completion of directories at the "Go To Directory" prompt
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3280 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-02-07 21:11:05 +00:00
David Lawrence Ramsey 4a2e0000f7 fix more bracket matching breakage
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3264 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-28 06:04:59 +00:00
David Lawrence Ramsey db2dc81cee fix multibyte bracket search breakage, and add documentation fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3261 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 22:35:52 +00:00
David Lawrence Ramsey d89617fb17 allow specifying matching bracket characters other than the default via
the "matchbrackets" rcfile option


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3259 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 21:51:10 +00:00
David Lawrence Ramsey a248863b43 rework the bracket searching code to handle multibyte bracket characters
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-01-06 07:10:30 +00:00
David Lawrence Ramsey 6d6a36c647 add descriptive comments to pretty much all functions and major
variables that don't have them, plus a few miscellaneous minor fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3237 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 07:09:08 +00:00
David Lawrence Ramsey 034b994eb5 since proto.h includes nano.h, and nano.h includes config.h first,
include proto.h first and remove redundant includes of config.h in all
non-header source files


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3236 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-08 02:47:10 +00:00
David Lawrence Ramsey 24777c0740 fix compilation with --enable-debug, and remove unneeded assert
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3234 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-12-01 05:49:08 +00:00
David Lawrence Ramsey 315eb3280a adjust copyright notices in all source files to account for Chris'
reassigning the 2005-2006 copyright on nano to me


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-28 19:35:29 +00:00
David Lawrence Ramsey ad074011c9 in get_prompt_string(), adjust #ifdefs to leave out disabled keys
entirely instead of keeping enough code to just ignore them


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3196 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 21:34:46 +00:00
David Lawrence Ramsey c009ec56f5 breakage and comment fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3195 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 13:57:21 +00:00
David Lawrence Ramsey 5ab56eaa8d refactor the statusbar prompt's bracket searching code to be closer to
the edit window's bracket searching code


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3194 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 13:45:41 +00:00
David Lawrence Ramsey eba0711939 comment fix
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3188 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-16 04:26:33 +00:00