Commit Graph

493 Commits (452066bc88282173c5c7d6f622fdbc3875e5c977)

Author SHA1 Message Date
Benno Schulenberg 452066bc88 Chopping the 'undoing' parameter, so that the calls of do_cut_text() become
more symmetrical: wrapped in add_undo() + update_undo() where needed.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5390 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-11-02 13:46:40 +00:00
Benno Schulenberg 0d9397e5b0 Making ^O work the same way as under Pico when option -t is given:
writing out the file immediately, without prompting.
Patch by David Lawrence Ramsey.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5378 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-10-29 10:36:07 +00:00
Benno Schulenberg 6620de0091 Dropping a return value that is never used.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5371 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-09-05 09:22:50 +00:00
Benno Schulenberg 8925eabd5e Not bothering to set things to NULL when they will be initialized right away,
nor bothering with a separate initialization function when it's used only once.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5365 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-16 15:21:32 +00:00
Benno Schulenberg 7a1959fb11 Not bothering to pass around a function when it's used only once.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5361 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-16 09:28:33 +00:00
Benno Schulenberg 90798fbfba Allowing to toggle whitespace display also when support for nanorc files
has not been built in, since the default values are quite usable.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5348 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-08-09 16:05:50 +00:00
Benno Schulenberg b3e4051ded Adding two new bindable functions which delete all characters
from the cursor to the preceding or succeeding word start.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5334 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-31 11:52:26 +00:00
Benno Schulenberg 6847616aee Differentiating between something being disabled/restricted and
help texts being unavailable.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5331 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-30 18:10:16 +00:00
Benno Schulenberg 4990f74f83 Adding two new bindable functions that repeat the last search command
in a fixed direction without prompting.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5320 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-26 09:23:24 +00:00
Benno Schulenberg ee7b095678 Adding a new bindable function that writes a file to disk without
first asking for its name.  Patch was suggested by Seiya Nuta.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5318 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-07-25 19:25:50 +00:00
Benno Schulenberg 86cbd959f6 Renaming the parameter 'current_action' to 'action',
in order to match the other functions.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5254 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-06-17 11:18:20 +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 f111c0d6ab Limiting the number of backup files to one hundred thousand, well
before finding a unused filename takes an annoying amount of time.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5225 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-05-08 21:11:30 +00:00
Benno Schulenberg df7524d7e8 Renaming the parameter 'whole_word' to 'whole_word_only',
because the first sounds too much like "found_whole" to me.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5216 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-25 15:26:09 +00:00
Benno Schulenberg b454d9c89b Deleting an always-FALSE parameter.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5215 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-25 15:17:22 +00:00
Benno Schulenberg af708843f6 Removing the unintended special case for replacing
multiple occurrences of a literal ^ or $.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5214 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-25 14:52:58 +00:00
Benno Schulenberg ca1983adb4 Eliding another tiny function.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5213 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-21 18:47:58 +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 7edd350593 Fusing two identical functions into one: need_screen_update().
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5207 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-20 08:16:41 +00:00
Benno Schulenberg 2dc9cbefd3 Renaming some things, for more contrast or to be more fitting.
And condensing the renamed function, and making it void because
the result isn't used anyway.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5187 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-08 18:40:40 +00:00
Benno Schulenberg d5177059e8 Greatly simplifying the searching for the next matching filename.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5182 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 13:34:12 +00:00
Benno Schulenberg 37fd348a1d Eliding a miniscule function, and renaming a variable for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5180 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-04-07 10:41:00 +00:00
Benno Schulenberg 07e199ff0e When searching, put a found off-screen string on the center line
instead of at the bottom or top, to show it in context.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5170 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-28 17:01:46 +00:00
Benno Schulenberg 03bcaf6067 Fixing compilation with --enable-tiny plus --enable-nanorc.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5133 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-03-08 12:10:52 +00:00
Chris Allegretta 5b1fb56a8f Take 2 at file locking fixes. New args to close_buffer() and
switch_to_prevnext_buffer() to support message passthrough
when trying to lock files using multibuffer.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5105 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-20 06:15:34 +00:00
Chris Allegretta 4b3f2771b5 2015-01-03 Chris Allegretta <chrisa@asty.org>
* New formatter code to support syntaxes like
        go which have tools to automatically lint and reformat the text for
        you (gofmt), which is lovely.  rcfile option formatter, function
        text.c:do_formatter() and some other calls.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5100 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2015-01-03 07:24:17 +00:00
Benno Schulenberg 6c86ee1a5b Deleting old wrapper 'getfuncfromkey()', and replacing its call
with a call of the new wrapper 'func_from_key()'.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5052 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 19:12:38 +00:00
Benno Schulenberg 6418ffa289 Making use of the new wrapper in the help viewer and the file browser.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5051 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-07-02 09:29:05 +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 95e77a9d5f Renaming '*cut_till_end' to '*cut_till_eof', to reduce
confusion with CUT_TO_END, which is about end-of-line.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5041 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-30 20:39:27 +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 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 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 a0f66c0691 Renaming 'no_replace_void()' to 'flip_replace_void()',
to show what it actually does.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5014 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-23 18:30:35 +00:00
Benno Schulenberg 492e9f605b Miscellaneous whitespace adjustments and comment tweaks.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4995 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:48:26 +00:00
Benno Schulenberg 03f37add07 Another removal and more regrouping.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4993 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 10:34:52 +00:00
Benno Schulenberg 4147c5e0fc Removing two obsolete variables and regrouping some stuff.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4992 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-20 07:55:24 +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 e7c690d577 Renaming 'no_more_space()' to 'more_space()' for consistency.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4985 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-19 11:58:11 +00:00
Benno Schulenberg 336d1b8902 Renaming 'function_type' to 'key_type', for clarity.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4983 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 20:43:05 +00:00
Benno Schulenberg a872709ab4 Making sure the cutbuffer is cleared at the appropriate moments.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4978 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-18 19:04:35 +00:00
Benno Schulenberg be10c2a48c Rewriting the line-wrapping code to make use of the existing line-break code.
And undoing line wraps together with their causal text additions, and not as
separate actions because the user did not make them.
Patch by Mark Majeres.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4945 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-09 10:01:54 +00:00
Benno Schulenberg 04a38da312 Allowing the toggle between Read File and Execute Command to be rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-04 19:15:16 +00:00
Benno Schulenberg d0e234db08 Removing three unused parameters from do_input(),
as they are only ever set and never referenced.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-28 13:24:05 +00:00
Benno Schulenberg f5ac8c1ee1 Placing the cursor after an undo there where it was before the do,
and handling multibyte characters correctly.
*Patch by Mark Majeres.*


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4908 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-25 19:41:49 +00:00
Benno Schulenberg 6081546161 Going to the correct positions for undoing and redoing cuts and
pastes.  This fixes many undo problems and Savannah bug #25585.
*Patch by Mark Majeres.*


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4893 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-15 20:00:46 +00:00
Benno Schulenberg cf4f80da9a Renaming and symmetrifying two functions, and improving some comments.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4861 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-05-12 13:52:50 +00:00