ChangeLog.2007-2015 (205537B)
1 [Development moved to git on April 1. The Changelog was discontinued.] 2 3 4 2016-03-31 Benno Schulenberg <bensberg@justemail.net> 5 * src/text.c (do_int_spell_fix): Replace a fake 'while', delete a 6 redundant 'if', rename a variable, and adjust whitespace. 7 8 2016-03-30 Benno Schulenberg <bensberg@justemail.net> 9 * src/search.c (do_replace_loop, go_looking, findnextstr): Report 10 "Cancelled" instead of "Not found" when the user aborts a replace 11 that is taking too long. This fixes Savannah bug #47439. 12 * src/winio.c (do_replace_highlight): Rename this to 'spotlight', 13 for clarity, and for contrast with 'do_replace/do_replace_loop'. 14 * src/winio.c (spotlight): Rename a variable for clarity. 15 * src/files.c (input_tab), src/prompt.c (get_prompt_string): 16 Rename a variable to better indicate booleanness. 17 * src/text.c (do_int_speller): Unwrap a few lines. 18 19 2016-03-29 Benno Schulenberg <bensberg@justemail.net> 20 * src/nano.c (main), src/text.c (do_justify, do_verbatim_input), 21 src/winio.c (parse_escape_sequence): Place the cursor in the edit 22 window also when --constantshow is in effect, after a ^J Justify or 23 an invalid escape sequence, and when entering a verbatim keystroke. 24 Leave the cursor off during Unicode input, for extra feedback. 25 * src/browser.c (do_browser): Improve the wording of a message. 26 * src/chars.c (is_valid_unicode): Speed up Unicode validation. 27 * src/text.c (do_int_spell_fix): Allow to stop replacing a word 28 without aborting the entire spell-fixing session. 29 * src/search.c (do_replace_loop): Chop a now-unused parameter. 30 31 2016-03-28 Benno Schulenberg <bensberg@justemail.net> 32 * src/winio.c (statusbar): Don't bother putting back the cursor in 33 the edit window, as it is off anyway, and will be placed back in the 34 main loop. This prevents a segfault when trying to open a directory. 35 * src/search.c (findnextstr): Provide feedback when searching takes 36 longer than roughly half a second (on average). 37 * src/*.c: Remove the 'last_replace' variable that is never used. 38 * src/winio.c (parse_kbinput): Delete a no-op. 39 40 2016-03-23 Benno Schulenberg <bensberg@justemail.net> 41 * src/search.c (findnextstr): Prevent the internal spell checker from 42 finding the first occurrence twice. And delete the piece of dead code 43 that was meant to do this. This fixes Savannah bug #47188. 44 * src/search.c (findnextstr): Clean up and rename a variable. 45 * src/search.c (findnextstr): Poll the keyboard once per second. 46 * src/winio.c (reset_cursor): Remove a pointless condition, and make 47 use of an existing intermediary variable. 48 * src/winio.c (reset_cursor): Tidy up and rename a variable. 49 * src/winio.c (onekey): Elide an unneeded 'if' and unneeded variable. 50 51 2016-03-22 Thomas Rosenau <thomasr@fantasymail.de> 52 * configure.ac, src/*.c: Check for the existence of the REG_ENHANCED 53 regex flag, and use it when it's available (on OS X systems). This 54 completes the fix for Savannah bug #47325. 55 56 2016-03-21 Benno Schulenberg <bensberg@justemail.net> 57 * src/browser.c (findnextfile): Trim a duplicate variable. 58 * src/browser.c (browser_refresh, findnextfile): Rename four vars. 59 60 2016-03-20 Benno Schulenberg <bensberg@justemail.net> 61 * src/files.c (do_writeout), src/nano.c (do_exit): Normalize the 62 punctuation in some prompts: no space before a question mark, and 63 a semicolon instead of a comma between phrases. 64 * src/text.c (do_cutword): Don't put cut words into the cutbuffer -- 65 that is: treat the deletion of words like pressing Backspace/Delete. 66 * src/search.c (get_history_completion, find_history): Cycle through 67 the items from newest to oldest. This fixes Savannah bug #47205. 68 * src/files.c (do_writeout): When the name of the file was changed, 69 always ask whether this is okay. This fixes Savannah bug #46894. 70 * src/search.c (do_research): Use 'return' instead of 'else'. 71 * src/search.c (do_search): Don't bother setting 'answer'; just use 72 'last_search', which has been set to 'answer' in search_init(). 73 * src/search.c (go_looking): Factor out the common part of 74 do_search() and do_research() into this new function. 75 76 2016-03-19 Benno Schulenberg <bensberg@justemail.net> 77 * src/search.c (search_init): Always remember the last typed string, 78 also when it's an invalid regex. This fixes Savannah bug #47440. 79 * src/search.c (search_init, do_replace): Don't bother setting the 80 current answer to the empty string, as do_prompt() can handle a NULL. 81 * src/browser.c (do_browser): Delete a snippet of dead code. 82 * src/browser.c (do_browser): Delete an unneeded variable. 83 * src/search.c (do_gotolinecolumn): Delete another unneeded variable. 84 * src/search.c (search_init): Snip an always-FALSE condition. 85 * src/search.c (search_init): Reshuffle stuff to reduce indentation. 86 * src/search.c (do_replace): Snip a useless setting of answer. 87 88 2016-03-17 Benno Schulenberg <bensberg@justemail.net> 89 * src/search.c (do_research): Use the Search key bindings also during 90 a Re-search, to enable cancelling. This fixes Savannah bug #47159. 91 * src/search.c (do_replace): Remove two redundant returns. 92 * src/search.c (findnextstr): Prune two #ifdefs. 93 * src/search.c: Adjust some indentation. 94 95 2016-03-14 Benno Schulenberg <bensberg@justemail.net> 96 * src/color.c (color_update): Don't dereference a possible NULL. 97 * src/rcfile.c (parse_colors): Make error message equal to others. 98 * src/rcfile.c (parse_rcfile): Rearrange some things to reduce the 99 indentation level by four steps, so we can unwrap a dozen lines. 100 101 2016-03-13 Benno Schulenberg <bensberg@justemail.net> 102 * src/search.c (regexp_init): Allow using the word boundary markers 103 \< and \> in search strings on non-GNU systems. This is a partial 104 fix for Savannah bug #47325 reported by Thomas Rosenau. 105 * src/rcfile.c (parse_rcfile, parse_colors, nregcomp): Combine the 106 regular-expression flags at compile time instead of at run time. 107 * src/rcfile.c (parse_syntax, parse_colors): Rename a variable. 108 * src/winio.c (edit_draw): Give a central variable a ringing name. 109 110 2016-03-13 Thomas Rosenau <thomasr@fantasymail.de> (tiny change) 111 * autogen.sh, README.SVN: Mention SVN instead of CVS. 112 113 2016-03-12 Benno Schulenberg <bensberg@justemail.net> 114 * src/color.c (color_update): Set the syntax and regex pointers 115 just once, in a single place. And unnest two 'if's. 116 * src/rcfile.c (parse_one_include, parse_includes): New names for 117 these functions, to be more distinguishable. 118 * src/rcfile.c (parse_colors): Reduce the indentation. 119 * src/rcfile.c (parse_colors): Rename a variable. 120 * src/rcfile.c (parse_colors, parse_rcfile): Refind the tail of 121 the colors list only when extending, not for every added color. 122 123 2016-03-11 Benno Schulenberg <bensberg@justemail.net> 124 * src/browser.c (do_browser): Fix compilation when configured with 125 --enable-tiny plus --enable-browser. 126 * src/rcfile.c: Tweak some comments and reshuffle some lines. 127 * src/rcfile.c (color_to_short): Elide a variable. 128 * src/rcfile.c (grab_and_store): First check that there is an 129 open syntax before checking that it is named "default". 130 * src/rcfile.c (parse_rcfile): Fix compilation when configured with 131 --enable-tiny plus --enable-nanorc. 132 133 2016-03-10 Benno Schulenberg <bensberg@justemail.net> 134 * src/rcfile.c (grab_and_store): Do not accept 'header' and 'magic' 135 commands for the default syntax. This fixes Savannah bug #47323. 136 * src/rcfile.c (pick_up_name): Fold the parsing of a linter and 137 formatter command into a single routine. 138 * src/rcfile.c (parse_header_exp, parse_magic_exp, grab_and_store): 139 Elide the first two functions, and reshuffle parameters in the last. 140 * src/rcfile.c (parse_syntax, parse_rcfile), src/color.c 141 (color_update): Turn the linked list of syntaxes upside-down, so that 142 the last-defined one comes first, so that searching can stop at the 143 first match instead of always having to run through the entire list. 144 * src/rcfile.c: Rename a variable to better fit its new role. 145 146 2016-03-09 Benno Schulenberg <bensberg@justemail.net> 147 * src/rcfile.c (parse_syntax): Produce an adequate error message 148 when the syntax name is unquoted. This fixes Savannah bug #47324. 149 * src/rcfile.c (parse_syntax): Use the grab_and_store() function 150 also for gathering up extension regexes. 151 152 2016-03-04 Benno Schulenberg <bensberg@justemail.net> 153 * src/color.c (found_in_list): Don't bother keeping the compiled 154 regular expression when it matched -- drop this tiny optimization 155 for when opening multiple files. Instead stop calling malloc(). 156 * src/nano.h: Delete a now-unused struct member. 157 * src/global.c (free_list_item): Elide this now too tiny function. 158 * scr/global.c (thanks_for_all_the_fish): Rename three variables. 159 * src/rcfile.c (parse_colors): Tweak a few things. 160 * src/color.c (color_update): Rename a variable. 161 162 2016-03-01 Benno Schulenberg <bensberg@justemail.net> 163 * src/rcfile.c (parse_syntax), src/color.c (color_update): Don't 164 bother discarding a duplicate syntax (it's too rare, saves little 165 memory, and freeing it properly would cost even more code), just 166 select the last-defined one. This addresses Savannah bug #47303. 167 * src/color.c (color_update): Allow to select an empty syntax. 168 169 2016-02-29 Benno Schulenberg <bensberg@justemail.net> 170 * src/nano.h, src/rcfile.c, src/color.c: Rename a struct member. 171 * src/rcfile.c (parse_rcfile): Don't allocate a struct for the 172 "none" syntax (and thus prevent it from being extended). 173 * src/nano.h, src/rcfile.c: Arrange some things more orderly. 174 * src/rcfile.c (parse_rcfile): Close an extended syntax again. 175 * src/rcfile.c (parse_rcfile): Rename a variable. 176 * src/rcfile.c (grab_and_store): Fix breakage of r5695. 177 * src/color.c (color_update): Do not dereference symlinks, so that 178 the syntax will be derived from the name given on the command line, 179 not from that of the target file. This fixes Savannah bug #47307. 180 181 2016-02-28 Benno Schulenberg <bensberg@justemail.net> 182 * src/rcfile.c (parse_header_exp): Don't continue when something is 183 wrong -- skip the rest of the line. This fixes Savannah bug #47289. 184 * src/rcfile.c (parse_header_exp, parse_magic_exp, grab_and_store): 185 Use the now correct parsing of header regexes also for parsing magic 186 regexes. This fixes Savannah bug #47292 and saves 50 lines of code. 187 * src/rcfile.c (grab_and_store): Rename a variable and densify. 188 * src/rcfile.c (grab_and_store): Do not drop regexes that were 189 gathered earlier. This fixes Savannah bug #47285. 190 * src/rcfile.c (grab_and_store): Rearrange things in my style. 191 * src/rcfile.c (parse_syntax, parse_rcfile): Disallow adding any 192 further things to a syntax when an rcfile ends or when an invalid 193 syntax command is found. This fixes Savannah bug #47207. 194 195 2016-02-26 Benno Schulenberg <bensberg@justemail.net> 196 * doc/man/nanorc.5, doc/texinfo/nano.texi, doc/syntax/nanorc.nanorc, 197 doc/nanorc.sample.in: Correct the description of 'justifytrim', add 198 it to the Info document, sort it, and tweak a wording. 199 * src/color.c (color_update): Look for a default syntax only when 200 all else failed -- forego the small, complicating optimization. 201 * src/color.c (color_update): Strip things bare to see the sameness. 202 * src/color.c (found_in_list): Factor out this triple repetition. 203 * src/color.c (color_update): Rename a variable for conciseness. 204 * src/color.c (nfreeregex): Elide this function, now used just once. 205 * src/nano.h: Rename a struct element for aptness and contrast. 206 * src/nano.h: Rename another element, because it refers not just 207 to file extensions, but also to header lines and magic strings. 208 209 GNU nano 2.5.3 - 2016.02.25 210 211 2016-02-25 Benno Schulenberg <bensberg@justemail.net> 212 * src/browser.c (do_browser): Plug a memory leak by not copying 213 a string twice. This fixes Savannah bug #47206. 214 * src/browser.c (do_browser): Now put things in the proper order. 215 * src/files.c (make_new_buffer), src/nano.c (splice_opennode): Elide 216 the latter function, by handling the two cases (the creation of the 217 first element, and the insertion of a new element) directly. 218 219 2016-02-23 Benno Schulenberg <bensberg@justemail.net> 220 * src/prompt.c (do_statusbar_output, do_statusbar_delete): 221 Rename a variable, for contrast and correctness. 222 * src/cut.c (do_copy_text): Don't move the cursor when copying a 223 backwardly marked region. This fixes Savannah bug #46980. 224 * src/text.c (do_undo, do_redo): Center the cursor when the 225 thing being undone or redone is currently off the screen. 226 * src/{files,nano,winio}.c: Rewrap and reshuffle some lines. 227 228 2016-02-22 Chris Allegretta <chrisa@asty.org> 229 * Add the ability to kill the trailing spaces when justifying text, 230 by adding a new nanorc option 'justifytrim' -- we'll see whether 231 this warrants a command-line flag or not. Now with slightly 232 better logic for multi-spaced lines. 233 234 2016-02-22 Benno Schulenberg <bensberg@justemail.net> 235 * src/nano.c (free_openfilestruct): Elide this function. 236 * scr/global.c (thanks_for_all_the_fish, free_list_item): Condense. 237 * src/winio.c (edit_scroll): The amount to scroll is never zero. 238 * src/prompt.c (do_statusbar_prev_word, do_statusbar_next_word), 239 src/move.c (do_prev_word, do_next_word): Sort these in standard way. 240 * src/prompt.c (do_statusbar_output): Don't move too many bytes. 241 This fixes Savannah bug #47219 (uncovered by r5655). 242 * src/prompt.c (do_statusbar_output): Elide a variable. 243 * src/prompt.c (do_statusbar_delete): There is no need for nulling: 244 the charmove() already copies the terminating null byte. 245 * src/text.c (do_justify), src/winio.c (parse_escape_sequence): 246 Show the cursor after a justification and after an unrecognized 247 escape sequence, and in the edit window when linting. 248 * src/text.c (do_linter): Use the correct column number, also when 249 messages are skipped. And don't mind zero or negative numbers. 250 This is a partial fix for Savannah bug #47131. 251 252 2016-02-21 Benno Schulenberg <bensberg@justemail.net> 253 * src/files.c (input_tab): If the first Tab added the part that all 254 matches have in common, don't require a third Tab to show the list. 255 * scr/global.c (thanks_for_all_the_fish): Remove unneeded checks. 256 257 2016-02-20 Benno Schulenberg <bensberg@justemail.net> 258 * src/search.c (get_history_completion): Avoid leaking memory 259 when tabbing on a string that does not occur in the history. 260 This fixes Savannah bug #47124 reported by Mike Frysinger. 261 * src/files.c (input_tab): Parse a character in the correct 262 buffer. This fixes Savannah bug #47199. 263 * src/prompt.c (do_statusbar_output): Reduce an allocation to what 264 is actually needed. This undoes the papering-over of above bug. 265 266 2016-02-18 Benno Schulenberg <bensberg@justemail.net> 267 * src/search.c (do_replace_loop), src/text.c (do_int_spell_fix), 268 src/winio.c (edit_refresh): Fix Savannah bug #47127 the proper way. 269 * src/nano.c (free_filestruct): Allow the parameter to be NULL. 270 * src/search.c (search_init): Delete a debugging leftover. 271 272 2016-02-16 Benno Schulenberg <bensberg@justemail.net> 273 * src/files.c (initialize_buffer_text): Delete redundant assignment. 274 275 2016-02-15 Benno Schulenberg <bensberg@justemail.net> 276 * src/files.c (read_file): Free not just the struct but also the 277 data it contains, and also when it is the first and only line. 278 This fixes Savannah bug #47153 reported by Mike Frysinger. 279 * src/files.c (get_full_path): Avoid losing a buffer when getcwd() 280 fails. This fixes Savannah bug #47129 reported by Mike Frysinger. 281 282 2016-02-14 Benno Schulenberg <bensberg@justemail.net> 283 * src/search.c (do_replace_loop): Make iterating through replacement 284 matches behave again like iterating through search matches: showing 285 them centered when found offscreen. This fixes Savannah bug #47127. 286 * src/text.c (do_int_spell_fix): Restore the above behavior also for 287 the internal spell fixer. 288 * src/prompt.c (do_statusbar_input, do_statusbar_verbatim_input, 289 do_statusbar_output): Do the copying from input to output just once. 290 * src/prompt.c (do_statusbar_output): Rename and condense some stuff, 291 and correct the main comment: filtering means allow_cntrls==FALSE. 292 * README, TODO, doc/man/{nano.1,rnano.1,nanorc.5}: Say that 2.5.x 293 is a "rolling" release, lock files are done, and prepare for 2.5.3. 294 295 2016-02-13 Benno Schulenberg <bensberg@justemail.net> 296 * src/browser.c (do_browser, browser_refresh): Rebuild the file list 297 only when necessary, not for each and every cursor movement. This 298 fixes Savannah bug #47133. 299 * src/files.c (save_poshistory): Allocate enough space for printing 300 out the line and column numbers. This fixes Savannah bug #47135. 301 * src/*.c: Switch the cursor on and off at the appropriate moments, 302 so that it no longer shows in the help screen nor in the file list. 303 This fixes Savannah bug #47126. 304 305 GNU nano 2.5.2 - 2016.02.12 306 307 2016-02-11 Benno Schulenberg <bensberg@justemail.net> 308 * src/text.c (do_linter): Go to the next item in the list before 309 freeing the current one. This fixes Savannah bug #46796. 310 * src/text.c (do_formatter): Don't leave curses mode, as that would 311 hide any error messages upon reentry. And if there are any messages, 312 allow the user a little time to read them. 313 * src/text.c (do_linter, do_formatter): Condense some declarations, 314 rewrap some lines, and improve a few comments. 315 * doc/syntax/go.nanorc: Make the formatter command more visible. 316 317 2016-02-10 Benno Schulenberg <bensberg@justemail.net> 318 * src/text.c (discard_until): Prevent a chain of editing actions from 319 continuing after a discard. This fixes Savannah bug #47104. 320 * src/files.c (get_full_path): Plug a sneaky memory leak. This fixes 321 Savannah bug #47003 reported and solved by Mike Frysinger. 322 * src/rcfile.c (parse_binding): Allow only control sequences in the 323 proper range to be rebound. This fixes Savannah bug #47025. 324 * THANKS: Add a Spanish, a Catalan, and a Croat translator. 325 * AUTHORS, THANKS: Remove SVN Id tags and a duplication. 326 * src/winio.c (get_kbinput), src/nano.c (main): Switch the cursor on 327 in the right place: in the central input routine. 328 * src/files.c (load_poshistory): Free any records that are dropped. 329 This fixes Savannah bug #47111 reported by Mike Frysinger. 330 331 2016-02-09 Benno Schulenberg <bensberg@justemail.net> 332 * src/files.c (stat_with_alloc, open_buffer, write_file): Check the 333 result of a stat() to avoid referencing uninitialized data. Original 334 patch was by Kamil Dudka. 335 * doc/man/{nano.1,rnano.1,nanorc.5}: Adjust version for release. 336 337 2016-02-07 Benno Schulenberg <bensberg@justemail.net> 338 * src/files.c (update_poshistory): Don't put files in the history list 339 when they have the default cursor position (line 1, column 1). 340 * src/files.c (write_file): Avoid a pointless lstat() when not writing 341 to a temp file, and in the bargain elide two variables. 342 * src/files.c (write_file): Elide an unneeded 'if'. 343 * doc/syntax/c.nanorc: Use a character class instead of a literal tab 344 and space. The change was inspired by David Niklas. 345 * src/prompt.c (do_yesno_prompt): Normalize the indentation. 346 * src/prompt.c (do_yesno_prompt): Rename a variable. 347 348 2016-02-06 Benno Schulenberg <bensberg@justemail.net> 349 * src/files.c (write_file): Remove the --nofollow option that hasn't 350 been working for a dozen years. 351 * src/winio.c (statusbar): Update the screen immediately whenever a 352 message has been posted on the status bar. 353 * src/winio.c (statusbar), src/nano.c (do_input): Turn the cursor off 354 when writing in the status bar, and on when waiting for input. 355 * src/prompt.c (update_the_statusbar): Chop two parameters that are 356 always the same, and that are global variables anyway. 357 * src/prompt.c (update_bar_if_needed): Rename this for more contrast. 358 * src/prompt.c (do_statusbar_backspace): Avoid updating the bar twice. 359 * src/cut.c, src/files.c, src/prompt.c: Rewrap some lines and remove 360 some useless comments. 361 362 2016-02-05 Benno Schulenberg <bensberg@justemail.net> 363 * doc/texinfo/nano.texi: Condense the descriptions of command-key 364 sequences and of the screen layout, mention how to enter Unicode, 365 and mention that regular expressions are line oriented. 366 * src/global.c (shortcut_init): Put four strings in standard order. 367 * src/text.c (do_undo), src/global.c (shortcut_init): Guide the 368 translators a little bit. 369 370 2016-01-31 Benno Schulenberg <bensberg@justemail.net> 371 * src/files.c (has_valid_path): Be more specific in how a given path 372 is invalid. The change was improved by Rishabh Dave. 373 * doc/syntax/nanorc.nanorc: Show ^^ and M-^ as valid key names. 374 * src/prompt.c (do_statusbar_home): Make Home go always fully home. 375 376 2016-01-29 Benno Schulenberg <bensberg@justemail.net> 377 * src/files.c (do_insertfile): Do display the buffer when configured 378 with only --disable-histories. This fixes Savannah bug #47011. 379 * src/nano.c (main): Check position history only when 'positionlog' 380 is set. This fixes a bug unconsciously reported by Mike Frysinger. 381 * src/files.c (do_lockfile): Plug a couple of memory leaks. 382 * src/files.c (update_poshistory): Plug another memory leak. 383 * src/files.c (close_buffer): Update position history only when 384 the option 'positionlog' is set. 385 386 2016-01-26 Benno Schulenberg <bensberg@justemail.net> 387 * src/files.c (update_poshistory): Do not add directories to the 388 list of file positions. This fixes Savannah bug #46971. 389 * src/*.c: Adjust some indentation and some line wrapping. 390 * src/prompt.c (do_statusbar_prev_word): When in the middle of a 391 word, jump to the start of the current word, not to the start of 392 the preceding one. This fixes Savannah bug #46970. 393 * src/prompt.c (do_statusbar_next_word): Use simpler algorithm. 394 395 2016-01-25 Benno Schulenberg <bensberg@justemail.net> 396 * src/files.c (update_poshistory): Handle an update of the first 397 element correctly. 398 * doc/texinfo/nano.texi: Document the --enable-altrcname option. 399 The lack of this was pointed out by Frank. 400 * doc/man/nano.1, doc/man/nanorc.5, doc/texinfo/nano.texi: Mention 401 that the position history is limited to the 200 most recent files. 402 403 2016-01-24 Benno Schulenberg <bensberg@justemail.net> 404 * src/files.c (update_poshistory): Move an updated item to the end 405 of the list, so that it won't be dropped any time soon. The problem 406 was pointed out by David Niklas. 407 * src/winio.c (edit_redraw): Condense by removing a triplication. 408 * src/prompt.c (do_statusbar_prev_word, do_statusbar_next_word): 409 Chop an always-FALSE parameter and delete an unused return value. 410 * src/prompt.c (do_prompt): Remove a superfluous free. 411 * src/prompt.c (update_the_bar): Bundle some statements. 412 * src/prompt.c (need_statusbar_update): Elide this function. 413 * src/prompt.c (total_statusbar_refresh): Elide this function too. 414 415 2016-01-22 Benno Schulenberg <bensberg@justemail.net> 416 * src/utils.c (get_homedir): Don't use $HOME when we're root, because 417 some sudos don't filter it out of the environment (which can lead to 418 a root-owned .nano/ directory in the invoking user's home directory). 419 It fixes https://bugs.launchpad.net/ubuntu/+source/nano/+bug/1471459. 420 * src/files.c (read_line): Rename a variable for clarity and contrast. 421 422 2016-01-21 Benno Schulenberg <bensberg@justemail.net> 423 * src/prompt.c (get_prompt_string): Preserve the cursor position on 424 the statusbar when just toggling a setting or making an excursion to 425 the file browser. This fixes Savannah bug #46945. 426 * src/prompt.c (do_prompt_abort): Remove this unneeded function, as 427 nothing can break out of do_prompt(), not a SIGWINCH either. 428 * src/prompt.c (get_prompt_string): Delete code that is dead now. 429 * src/prompt.c (get_prompt_string): Elide an unneeded variable. 430 * src/browser.c (do_browser): Delete unneeded blanking of a variable. 431 432 2016-01-20 Benno Schulenberg <bensberg@justemail.net> 433 * src/files.c (open_buffer): Readjust the indentation and a comment. 434 * src/files.c (has_valid_path): Get rid of a global variable. 435 436 2016-01-20 Rishabh Dave <rishabhddave@gmail.com> 437 * src/files.c (verify_path, open_buffer): When opening a new buffer, 438 verify that the containing directory of the given filename exists. 439 This fixes Savannah bug #44950. 440 * src/files.c (do_lockfile): Remove the existence check on the 441 directory, as this is now covered by verify_path(). 442 443 2016-01-17 Benno Schulenberg <bensberg@justemail.net> 444 * src/global.c: Fix typo in #ifndef symbol. Reported by Frank. 445 * doc/syntax/nanorc.nanorc: Remove '+' as only one menu is allowed. 446 * src/files.c (load_poshistory): Limit the number of loaded items. 447 448 2016-01-17 Mike Frysinger <vapier@gentoo.org> 449 * doc/syntax/nanorc.nanorc: Allow inline comments with key bindings. 450 451 2016-01-15 Benno Schulenberg <bensberg@justemail.net> 452 * src/winio.c (set_modified): Plug another memory leak. 453 * src/files.c (set_modified): Move this function to its habitat. 454 * src/files.c (open_file): Return the fantastic file descriptor 455 when the opening of a non-existent file for reading succeeds. 456 * src/nano.c (delete_opennode), src/text.c (discard_until): 457 Free the items on the undo stack when a buffer is closed. 458 This fixes Savannah bug #46904 reported by Mike Frysinger. 459 460 2016-01-15 Mike Frysinger <vapier@gentoo.org> 461 * src/files.c (open_file): Free the full filename in all cases. 462 463 2016-01-14 Benno Schulenberg <bensberg@justemail.net> 464 * doc/nanorc.sample.in: Remove a reference to an obsolete file. 465 Reported by Mike Frysinger. 466 * src/winio.c (edit_redraw): Delete an 'if' that is always FALSE. 467 * src/winio.c (edit_redraw): Elide an unneeded variable and adjust 468 some wrappings and whitespace. 469 * src/proto.h: Delete two duplicate declarations. 470 * src/rcfile.c (check_bad_binding): Elide this unneeded function. 471 * src/rcfile.c (parse_binding): Show key only when it was rebound. 472 473 2016-01-13 Benno Schulenberg <bensberg@justemail.net> 474 * src/files.c (save_poshistory): Reduce the indentation. 475 * src/*.c: Adjust a few comments and rewrap some lines. 476 477 2016-01-12 Benno Schulenberg <bensberg@justemail.net> 478 * NEWS: Fix some typos and whitespace, and normalize the dates. 479 * src/files.c (load_poshistory): Rename a variable. 480 * src/files.c (load_poshistory): Remove some code duplication. 481 * src/files.c (save_poshistory, update_poshistory, check_poshistory, 482 load_poshistory): Differentiate variable name from function names. 483 * src/files.c (load_poshistory): Remove a senseless iteration. 484 * src/files.c (load_poshistory): Condense the reading of a line. 485 * src/files.c (load_poshistory): Reduce the indentation. 486 487 GNU nano 2.5.1 - 2016.01.11 488 489 2016-01-10 Benno Schulenberg <bensberg@justemail.net> 490 * NEWS: Add item for upcoming 2.5.1. 491 * src/nano.c (version), src/winio.c (do_credits), doc/man/rnano.1, 492 doc/man/nano.1, doc/man/nanorc.5: Adjust dates and version number. 493 494 2016-01-09 Benno Schulenberg <bensberg@justemail.net> 495 * src/color.c (precalc_multicolorinfo), src/winio.c (edit_draw): 496 Make sure to keep advancing also when matches are zero-length. 497 This fixes Savannah bug #26977 reported by Tigrmesh. 498 * src/winio.c (update_line): For softwrap, don't go beyond the number 499 of available rows in the edit window. This fixes Savannah bug #42188. 500 * ChangeLog: Snip inconsistent blank lines. 501 502 2016-01-07 Benno Schulenberg <bensberg@justemail.net> 503 * src/global.c (assign_keyinfo): Delete two unneeded #ifdefs: if 504 they /could/ be false, the H and E keys would stop working. 505 * src/global.c (assign_keyinfo): Add a comment and use a symbol. 506 507 2016-01-04 Benno Schulenberg <bensberg@justemail.net> 508 * src/global.c (shortcut_init): Nowadays the functions are defined 509 only once, so there is no longer any need to free existing ones. 510 * src/global.c (sctofunc): Rewrite the loop, and constify the input. 511 * src/text.c (do_linter): Condense the exit code. 512 * src/nano.c (allow_sigwinch): Improve its name and its comments. 513 * src/global.c (shortcut_init): Add "Tab" as key description. 514 * src/text.c (do_linter): Gettextize a forgotten string. 515 * src/global.c (assign_keyinfo): Make "Tab" produce the appropriate 516 keycode. This fixes Savannah bug #46812 reported by Cody A. Taylor. 517 518 2016-01-04 Mike Frysinger <vapier@gentoo.org> 519 * src/global.c (strtosc, strtomenu): Constify the input parameter. 520 521 2016-01-03 Benno Schulenberg <bensberg@justemail.net> 522 * src/text.c (do_deletion), src/nano.c (do_input): Let reset_multis() 523 figure out whether after a deletion a full refresh is needed, before 524 doing a redraw of the current line. This fixes Savannah bug #46794. 525 * src/nano.c (do_output): Let reset_multis() figure out whether after 526 an addition a full refresh is needed (for multiline-regexes' sake), 527 instead of doing it always. 528 * src/color.c (reset_multis): Abort when having no multiline regexes. 529 * src/nano.c (do_input): A functionless shortcut should be impossible. 530 * src/nano.c (do_input): Adjust indentation. 531 532 2016-01-02 Benno Schulenberg <bensberg@justemail.net> 533 * src/text.c (do_spell, do_formatter): Plug three tiny memory leaks. 534 * src/text.c (do_alt_speller, do_formatter): There is no need here to 535 reinitialize the windows; it will be done when polling the keybuffer. 536 * src/winio.c (do_credits): Correctly restore the settings of NO_HELP 537 and MORE_SPACE. 538 539 2015-12-31 Benno Schulenberg <bensberg@justemail.net> 540 * src/text.c (do_formatter): Restore the cursor position differently. 541 * src/search.c (do_gotopos): Delete this now unused function. 542 * src/search.c (do_gotolinecolumn): Chop an always-FALSE parameter. 543 * src/search.c (do_gotolinecolumn): Chop a duplicate parameter -- 544 'allow_update' always has the same value as 'interactive'. 545 546 2015-12-30 Benno Schulenberg <bensberg@justemail.net> 547 * src/nano.c (main), src/files.c (open_buffer): Don't try to position 548 the cursor when opening a buffer failed (because the user specified a 549 directory, for example). This fixes Savannah bug #46778. 550 * doc/syntax/ocaml.nanorc: Normalize the comments. 551 552 2015-12-29 Benno Schulenberg <bensberg@justemail.net> 553 * doc/syntax/{c,objc,asm}.nanorc: Disable the regex for multiline 554 strings as it colours some things wrong and is a glutton on time. 555 556 2015-12-23 Benno Schulenberg <bensberg@justemail.net> 557 * src/files.c (do_writeout, do_writeout_void), src/global.c 558 (shortcut_init, strtosc), src/nano.c (do_exit, close_and_go), 559 doc/man/nanorc.5, doc/texinfo/nano.texi: In the writeout menu, 560 offer ^Q to close and discard the buffer without saving it. By 561 default, the key is bound only when --tempfile is in effect. 562 * doc/man/nanorc.5: Improve ordering of bindable functions. 563 * src/files.c (read_file): Don't open an extra blank buffer when 564 an empty file is read. Bug was exposed by r5498, December 18. 565 * src/files.c (do_writeout): When the user decides to save the 566 buffer after all, go back to the filename prompt because the 567 buffer may not have a name yet. This fixes Savannah bug #46752. 568 569 2015-12-23 Mike Frysinger <vapier@gentoo.org> 570 * doc/syntax/autoconf.nanorc: Handle .m4 files too, add the "elif" 571 keyword, handle dnl comments better, and mark trailing whitespace. 572 * src/files.c (save_history, save_poshistory): Don't make the user 573 hit Enter when there's an error saving history state at exit; it is 574 pointless and annoying. Just notify the user and move on. 575 * src/nano.c (main): On most 64-bit systems, casting a pointer to 576 an integer can cause valid pointers to be truncated and rejected. 577 Rework the code to test for the two invalid values directly. 578 579 2015-12-23 Christian Weisgerber <naddy@mips.inka.de> 580 * configure.ac: AC_CHECK_HEADERS_ONCE() is very special and cannot be 581 conditionalized. Use plain AC_CHECK_HEADERS() instead, to not check 582 for magic.h and zlib.h when configuring with --disable-libmagic. 583 584 2015-12-22 Benno Schulenberg <bensberg@justemail.net> 585 * src/color.c (precalc_multicolorinfo, alloc_multidata_if_needed): 586 Move these two functions to the file where they belong. And make 587 the checking for an impatient user into a separate routine. 588 * src/proto.h, src/winio.c (parse_escape_sequence, convert_sequence, 589 arrow_from_abcd): Better names for these three functions. 590 * src/winio.c (convert_sequence): Use return instead of a variable. 591 592 2015-12-20 Benno Schulenberg <bensberg@justemail.net> 593 * src/files.c (display_buffer), src/nano.c (main): Precalculate the 594 multiline-regex cache data for each buffer, not just for the first. 595 This fixes Savannah bug #46511. 596 597 2015-12-18 Benno Schulenberg <bensberg@justemail.net> 598 * src/color.c (color_init): Use less #ifdefs, and adjust indentation. 599 * src/color.c (set_colorpairs): Improve comments and rename vars. 600 * src/files.c (read_line): Chop a superfluous bool -- 'prevnode' being 601 NULL is enough indication that the first line is being read. 602 * src/files.c (switch_to_prevnext_buffer): Tweak comment and var name. 603 604 2015-12-11 Benno Schulenberg <bensberg@justemail.net> 605 * doc/syntax/Makefile.am: Add missing autoconf and nftables syntaxes. 606 * ChangeLog: Correct a bug number, plus a few other tweaks. 607 608 2015-12-08 Benno Schulenberg <bensberg@justemail.net> 609 * src/nano.c (splice_node, unlink_node): Let these functions update 610 'filebot', instead of doing it in four different places each. 611 * src/search.c (goto_line_posx), src/move.c (do_down): It should not 612 be necessary to doubly check for being at the end of file. 613 * src/text.c (do_justify): Rewrap and reorder a few lines. 614 615 2015-12-07 Benno Schulenberg <bensberg@justemail.net> 616 * src/winio.c (edit_draw): Quit the loop when there is no end match. 617 * src/files.c (do_writeout): When --tempfile is given, make ^O not 618 write out the file rightaway, as otherwise there is no way to discard 619 the edits. This undoes the core part of r5378 of September 29. See 620 https://lists.gnu.org/archive/html/help-nano/2015-11/msg00005.html. 621 622 GNU nano 2.5.0 - 2015.12.05 623 624 2015-12-05 Chris Allegretta <chrisa@asty.org> 625 * src/nano.c (main): key_defined() is an ncurses-ism. Add better 626 checks for this. 627 628 2015-12-05 Benno Schulenberg <bensberg@justemail.net> 629 * src/text.c: Fix compilation with --enable-tiny --enable-justify. 630 * doc/man/{nano.1,rnano.1,nanorc.5}, doc/texinfo/nano.texi: 631 Update date and version number to match the upcoming release. 632 * src/files.c, src/winio.c: Avoid two compilation warnings. 633 634 2015-12-04 Benno Schulenberg <bensberg@justemail.net> 635 * src/proto.h: Avoid a compilation warning. 636 * src/color.c (reset_multis_for_id, reset_multis_before/after): 637 Fuse these three functions into a single one. 638 * src/*.c: Rewrap some lines and tweak some comments. 639 640 2015-12-03 Benno Schulenberg <bensberg@justemail.net> 641 * src/text.c (discard_until): Move the trimming of the undo stack 642 into a separate function, so it can be used elsewhere. 643 * src/text.c (do_justify): Discard the entire undo stack, to prevent 644 nano from dying (or making mistakes) when trying to undo edits after 645 a justification. This works around Savannah bug #45531. 646 * src/text.c (do_indent): Also here discard the entire undo stack, to 647 prevent nano from making mistakes when trying to undo edits after an 648 indentation change. This works around Savannah bug #46591. 649 * doc/man/nano.1, doc/texinfo/nano.texi: Add a note about undo not 650 working after a justification or reindentation. 651 652 2015-12-02 Benno Schulenberg <bensberg@justemail.net> 653 * doc/syntax/python.nanorc: Don't colour triple quotes by themselves. 654 * doc/syntax/python.nanorc: Treat backslashed quotes properly, and 655 don't colour triple-quoted strings in two manners. 656 * src/text.c (do_justify): Accept not just the Uncut keystroke but 657 also the Undo keystroke for undoing a justification. 658 659 2015-12-02 Arturo Borrero González <arturo.borrero.glez@gmail.com> 660 * doc/syntax/nftables.nanorc: New file; syntax colouring for nftables. 661 This addresses Debian bug #805288. 662 663 2015-12-01 Benno Schulenberg <bensberg@justemail.net> 664 * src/files.c (do_insertfile): Mark the buffer as modified only when 665 actually something was inserted. This fixes Savannah bug #45409. 666 * src/files.c (do_insertfile): Rename two variables for clarity. 667 * src/text.c (redo_cut): Delete two redundant assignments. 668 * src/winio.c (edit_draw): Move a check to a better place. 669 * src/winio.c (edit_draw): Rename a label and elide an 'else'. 670 * src/winio.c (edit_draw): Unindent after previous change. 671 * src/color.c (reset_multis_before, reset_multis_after): Delete four 672 superfluous checks. 673 674 2015-11-30 Benno Schulenberg <bensberg@justemail.net> 675 * src/text.c (redo_cut, update_undo): When cutting reaches the EOF, 676 and NONEWLINES is set, there is no next line at which to put the 677 cutting point for a redo. So put it at the very end of the cut. 678 This fixes Savannah bug #46541. 679 * src/text.c (add_undo, update_undo, do_undo, do_redo), src/nano.h: 680 Store and retrieve the correct file size before and after an action. 681 This fixes Savannah bug #45523. 682 * src/files.c (free_chararray): Allow the parameter to be NULL. 683 This fixes Savannah bug #46420. 684 685 2015-11-29 Benno Schulenberg <bensberg@justemail.net> 686 * src/color.c (reset_multis): Evaluate correctly whether to reset 687 the multidata cache. This fixes Savannah bug #46543. 688 * src/color.c (reset_multis): Reset the multidata a bit less often. 689 * src/color.c (reset_multis): Adjust whitespace and comments. 690 * src/winio.c (edit_draw): When an end is found but nothing is painted 691 (because the coloured part is horizontally scrolled off), nevertheless 692 set the multidata to CBEGINBEFORE. This fixes Savannah bug #46545. 693 * src/winio.c (edit_draw): Use the main cache-allocation routine. 694 * src/winio.c (edit_draw): Delete two redundant conditions, and move 695 the least frequent case to the end. 696 * src/winio.c (edit_draw): Elide a variable, tweak some comments. 697 698 2015-11-28 Benno Schulenberg <bensberg@justemail.net> 699 * src/nano.c (main): Allow the user full control over the values of 700 MALLOC_CHECK_ and MALLOC_PERTURB_; nano shouldn't override these. 701 This reverts r5344 from August 6. 702 * src/nano.c (alloc_multidata_if_needed): When allocating a new 703 multidata array, initialize the array. Problem was betrayed by 704 using MALLOC_PERTURB_, and was located with valgrind. 705 706 2015-11-26 Benno Schulenberg <bensberg@justemail.net> 707 * src/text.c (do_redo): Not just the undoing, also the redoing of a 708 Backspace at EOF is a special case. This fixes Savannah bug #46532. 709 * src/text.c (do_redo): Warn about an impossible condition, instead 710 of blithely continuing. And elide an unneeded variable. 711 712 2015-11-25 Benno Schulenberg <bensberg@justemail.net> 713 * src/nano.c (do_output): Refreshing the whole edit window (instead 714 of just the current line) is not needed for any kind of syntax, but 715 only when there are multiline regexes. And check for this not on 716 every keystroke in a burst, but just once. 717 * src/text.c (do_undo): Warn about a condition that should never 718 occur, instead of silently continuing. 719 * src/text.c (do_undo): Elide an unneeded variable, and don't skip 720 the end of this function when things went wrong. 721 * src/text.c (do_undo, do_redo, add_undo, update_undo): Handle more 722 possible internal errors, and do it correctly. 723 * AUTHORS: Add Mark and myself. 724 725 2015-11-24 Benno Schulenberg <bensberg@justemail.net> 726 * doc/syntax/makefile.nanorc: Also recognize the extensions .make and 727 .mk as Makefiles. Suggested by Emmanuel Bourg in Debian bug #804845. 728 * src/color.c (color_update): Tell the user when a syntax name given 729 on the command line does not exist. This fixes Savannah bug #46503. 730 * src/nano.c (splice_node): Inserting a new node into a linked list 731 requires just two parameters: the insertion point and the new node. 732 * src/nano.c (splice_node): Rename a variable for clarity. 733 734 2015-11-23 Benno Schulenberg <bensberg@justemail.net> 735 * src/nano.c (main), src/winio.c (parse_kbinput): Make Ctrl+Left and 736 Ctrl+Right work on more terminals by asking ncurses for the keycodes. 737 This addresses Debian bug #800681 reported by Arturo Borrero González. 738 739 2015-11-22 Benno Schulenberg <bensberg@justemail.net> 740 * src/text.c (add_undo): Delete a condition that will never occur -- 741 this function is only ever called with PASTE when cutbuffer != NULL. 742 * src/text.c: Rewrap, rewrite, rename, and reorder some things. 743 * src/text.c (do_undo, do_redo): Elide an unneeded variable. 744 * src/nano.c (unlink_node): After unlinking, also delete the node. 745 746 2015-11-21 Benno Schulenberg <bensberg@justemail.net> 747 * src/nano.c (main): Let the value of a --fill option on the 748 command line override the value of a "set fill" in an rcfile. 749 This fixes Savannah bug #46492. 750 * ChangeLog, NEWS: Add the release marker and copy the news item. 751 752 2015-11-21 David Lawrence Ramsey <pooka109@gmail.com> 753 * ChangeLog, NEWS: Fix a typo and adjust some spacing. 754 755 GNU nano 2.4.3 - 2015.11.18 756 757 2015-11-12 Benno Schulenberg <bensberg@justemail.net> 758 * src/text.c (do_undo, update_undo): Store the correct end position of 759 an inserted file, and use it when undoing. Fixes Savannah bug #46414. 760 * src/text.c (add_undo, update_undo): Delete an unneeded alias -- it 761 wasn't being used consistently anyway. 762 763 2015-11-11 Benno Schulenberg <bensberg@justemail.net> 764 * src/text.c (do_redo, update_undo): Redo an Enter from the stored 765 undo data, instead of running do_enter() again, because the latter 766 will behave differently depending on the setting of autoindent. 767 This addresses Debian bug #793053 reported by Clancy. 768 * src/text.c (do_enter): Chop the now unused parameter 'undoing'. 769 * src/text.c (do_enter_void): Discard this now useless function. 770 771 2015-11-10 Benno Schulenberg <bensberg@justemail.net> 772 * src/winio.c (edit_draw): Skip a zero-length match only when there 773 /is/ a match. Found with valgrind. This fixes Savannah bug #41908. 774 * src/files.c (do_lockfile, update_poshistory): Plug memory leaks. 775 776 2015-11-08 Benno Schulenberg <bensberg@justemail.net> 777 * src/global.c (shortcut_init): Allow exiting from the file browser 778 with the same key (^T) as it was entered (as ^G for the help viewer). 779 * doc/syntax/changelog.nanorc: Accept longer bug and patch numbers. 780 781 2015-11-07 Benno Schulenberg <bensberg@justemail.net> 782 * src/search.c (do_replace_loop): Correct the logic for adjusting the 783 x position of the mark -- it happened to work because 'mark_begin' is 784 NULL when 'old_mark_set' is FALSE. Also improve the comments. 785 786 2015-11-06 Benno Schulenberg <bensberg@justemail.net> 787 * src/files.c (write_lockfile): Don't bail out when the hostname is 788 overlong, but instead truncate it properly and continue. This fixes 789 Ubuntu bug #1509081 reported by Sam Reed. 790 * src/global.c (length_of_list), src/winio.c(get_mouseinput): Don't 791 check whether a function has a help line, since all of them have. 792 (And even if some didn't, they would still be valid functions.) 793 * src/cut.c (cut_line): There is no need to set 'openfile->mark_begin' 794 just like that; it will be set when 'openfile->mark_set' becomes TRUE. 795 * src/text.c (do_redo): Delete a redundant assignment. 796 797 2015-11-02 Benno Schulenberg <bensberg@justemail.net> 798 * src/nano.h: Delete an unused type definition. 799 * src/nano.h: Improve several comments. 800 * src/text.c (do_wrap): Elide two variables. 801 * src/cut.c (do_cut_text): Chop the 'undoing' parameter, so that the 802 calls of this function become more symmetrical. 803 804 2015-10-31 Benno Schulenberg <bensberg@justemail.net> 805 * src/nano.c (copy_from_filestruct): When pasting while the mark is 806 on, the mark's pointer needs to be refreshed only when it is on the 807 same line as the cursor, and the mark's x coordinate only when the 808 mark is located after the cursor. This fixes Savannah bug #46347. 809 * src/nano.c (copy_from_filestruct): Improve comments and combine 810 two conditions. 811 * ChangeLog: Correct the description of an old change. 812 813 2015-10-29 Benno Schulenberg <bensberg@justemail.net> 814 * src/text.c (add_undo): Only skip adding an undo when the current 815 action equals the last action. This condition is needed for when 816 typing text is broken by an undo+redo. Fixes Savannah bug #46323. 817 * src/text.c (do_redo): Check for "nothing to redo" earlier, so we 818 can restore the possible warning about an internal error. 819 * src/text.c (add_undo): Remove an 'if' that will never be true, 820 and remove some assignments that have already been done. 821 822 2015-10-29 David Lawrence Ramsey <pooka109@gmail.com> 823 * src/files.c (do_writeout), src/nano.c (no_current_file_name_warning, 824 do_exit): When option -t is given, make ^O work the same way as under 825 Pico, writing out the file without prompting. And make it work even 826 better than Pico when the current file doesn't have a name yet. This 827 fixes Savannah bug #45415. [Reverted in r5489 on December 7.] 828 829 2015-10-28 Benno Schulenberg <bensberg@justemail.net> 830 * src/text.c (do_redo): For an INSERT, 'u->mark_begin_lineno' is not 831 an actual line number, so spoof it. It can be spoofed, because 'f' 832 is not used for the INSERT case. This fixes Savannah bug #45524. 833 * src/text.c (do_redo): Remove a condition that can never occur. 834 Also rewrite a loop to become somewhat clearer. 835 836 2015-10-27 Benno Schulenberg <bensberg@justemail.net> 837 * src/move.c (do_next_word): Rewrite this function to use the same 838 logic as do_prev_word(), reducing its number of lines to half. 839 * src/move.c (do_down): Don't calculate the line length twice. And 840 in the bargain avoid a warning about comparison of signed/unsigned. 841 842 2015-09-05 Benno Schulenberg <bensberg@justemail.net> 843 * src/winio.c (display_string, edit_draw): Force a redraw of a line 844 only when it contains a multicolumn character, to spare all regular 845 text this significant slowdown. This fixes Savannah bug #45684 846 reported by Wyatt Ward. 847 * src/move.c (do_prev_word): Drop a return value that is never used. 848 * src/move.c (do_prev_word): When in the middle of a word, jump to 849 its beginning instead of to the beginning of the preceding word. 850 Nano now matches the behaviour of Pico and of most other editors. 851 This fixes Savannah bug #45413. 852 853 2015-09-04 Benno Schulenberg <bensberg@justemail.net> 854 * src/chars.c: Reverting r5354 from August 12. This fixes Savannah 855 bug #45874. Apparently there is /some/ state somewhere after all. 856 857 2015-08-29 Benno Schulenberg <bensberg@justemail.net> 858 * doc/syntax/autoconf.nanorc: New file; syntax colouring for Autoconf. 859 * src/files.c: Rewrap some lines and tweak two comments. 860 861 2015-08-16 Benno Schulenberg <bensberg@justemail.net> 862 * src/help.c (help_init, help_line_len): Avoid wide paragraphs of text 863 in the help screens: wrap them at 74 columns if the screen is wider. 864 * src/help.c (help_init): Reduce the scope of a variable. 865 * src/help.c: Adjust some comments and whitespace. 866 * src/help.c (do_help, do_help_void): Don't bother passing a function 867 when it's used only once. 868 * src/help.c (help_line_len): The wrap location can be beyond the EOL, 869 so for determining the length of the current line, don't start at that 870 location but at the beginning. This fixes Savannah bug #45770. 871 * src/help.c (help_line_len): Rename and reorder most of it. 872 * src/nano.c (make_new_opennode), src/files.c (initialize_buffer): 873 Remove some duplication in the initialization of a new openfile node. 874 * src/nano.c (make_new_opennode): Don't bother setting things to NULL 875 when they will be initialized right away. 876 * src/files.c (make_new_buffer): Don't bother with a separate function 877 when it's used only once, right there. 878 * src/help.c (help_init): Since the new SIGWINCH handling, a resizing 879 of the window will no longer break out of the help viewer, so there is 880 no need any more for an extra freeing of the help text. 881 882 2015-08-13 Benno Schulenberg <bensberg@justemail.net> 883 * src/search.c (do_find_bracket): Remove mistaken comparison between 884 pointer and literal character. Found with cppcheck. 885 * src/browser.c (browser_init): Speed up the finding of the longest 886 filename: don't limit the value to that of COLS all the time, as this 887 is done later anyway, and don't bother skipping the dot entry. 888 * src/global.c (shortcut_init): In restricted mode, allow changing 889 the file format, but actually disable Appending, Prepending, making 890 Backups, and opening the File Browser. 891 892 2015-08-12 Benno Schulenberg <bensberg@justemail.net> 893 * src/chars.c: UTF-8 is a stateless encoding, so there is no need to 894 reset any state. [Reverted in r5369 on September 4.] 895 896 2015-08-11 Benno Schulenberg <bensberg@justemail.net> 897 * src/files.c (write_file): Avoid calling copy_file() with a null 898 pointer. Found with cppcheck. 899 * src/files.c (write_file): A failure to delete the temporary file 900 does not mean that it wasn't copied properly. 901 902 2015-08-09 Benno Schulenberg <bensberg@justemail.net> 903 * src/global.c, src/help.c (help_init), src/nano.c (do_toggle, main), 904 src/winio.c (display_string, statusbar): Allow toggling the display 905 of whitespace also when support for nanorc files was not built in, 906 because the default values are quite usable. 907 * src/files.c (read_file), src/rcfile.c, src/nano.c (main, usage): 908 Fix compilation with --enable-tiny; file formats are not available 909 then, so option --unix has no place; also add its description. 910 * src/nano.c (finish): Remove an unneeded and mistaken condition. 911 * src/nano.c (say_there_is_no_help): Make it sound more definitive. 912 913 2015-08-08 Benno Schulenberg <bensberg@justemail.net> 914 * src/winio.c (display_string): For some reason the reallocation done 915 by null_at() messes things up. So put in the null byte "manually". 916 This is a fix -- or workaround -- for Savannah bug #45718. 917 918 2015-08-06 Benno Schulenberg <bensberg@justemail.net> 919 * src/nano.c (main): For --enable-debug builds, let malloc() help 920 to find initialization failures and uses-after-free. Suggested by 921 Mike Frysinger. [Reverted in r5446 on November 28.] 922 * doc/texinfo/nano.texi: Improve the formatting, using @t to mark 923 double-quoted literal strings, @: to mark periods that do not end 924 sentences, and @. to mark a finishing period after a capital. 925 926 2015-08-04 Benno Schulenberg <bensberg@justemail.net> 927 * src/nano.c (main), src/files.c (read_file), src/rcfile.c, 928 doc/man/nano.1, doc/man/nanorc.5, doc/texinfo/nano.texi: Add 929 the option --unix, to save a file by default in Unix format. 930 * doc/nanorc.sample.in: Advertise the five new bindable functions. 931 * doc/man/nano.1, doc/man/nanorc.5, doc/texinfo/nano.texi: Tweaks. 932 933 2015-08-03 Benno Schulenberg <bensberg@justemail.net> 934 * src/rcfile.c (parse_binding): Check the value of shortcut->toggle 935 only if it actually is a toggle. Found with valgrind. 936 * src/files.c (write_lockfile): Plug a leak. Found with valgrind. 937 * src/rcfile.c (parse_binding): Plug a tiny leak. 938 939 2015-08-02 Benno Schulenberg <bensberg@justemail.net> 940 * src/files.c (initialize_buffer): Initialize also openfile->syntax. 941 This addresses Debian bug #787914 reported by Paul Wise. 942 943 2015-08-01 Benno Schulenberg <bensberg@justemail.net> 944 * src/nano.c (precalc_multicolorinfo): Set each multiline-color 945 value instead of OR-ing it. This fixes Savannah bug #45640. 946 * src/help.c (help_init): Show also the dedicated keys in the 947 ^G help text. This helps to clarify some keys, and helps to 948 see which ones could easily be rebound. 949 * src/nano.c (usage): Add "and exit" to the description of --help, 950 to match --version, and to distinguish it more from ^G. 951 952 2015-07-31 Benno Schulenberg <bensberg@justemail.net> 953 * src/text.c (do_cutword, do_cut_prev_word, do_cut_next_word), 954 src/global.c (shortcut_init, strtosc), doc/texinfo/nano.texi, 955 doc/man/nanorc.5: Add two new bindable functions, 'cutwordleft' 956 and 'cutwordright', which delete all characters from the cursor 957 to the preceding or succeeding word start. Fixes bug #32803. 958 959 2015-07-30 Benno Schulenberg <bensberg@justemail.net> 960 * src/global.c (shortcut_init): Don't show ^R and ^T in the help 961 lines in restricted mode (if possible), to give visual feedback. 962 * src/*.c: Normalize the whitespace after the preceding changes. 963 * src/nano.c (show_restricted_warning, say_there_is_no_help): 964 Differentiate between something being disabled/restricted (because 965 of the way of invocation) and help texts being unavailable (which 966 is a compile-time decision). 967 * src/global.c (shortcut_init): Change "Justify" to a tag and regroup. 968 * src/nano.c (do_suspend_void, do_suspend): Provide feedback when 969 suspension is not enabled; and it cannot be enabled in restricted 970 mode any longer, so there is no need to check for that any more. 971 972 2015-07-29 Benno Schulenberg <bensberg@justemail.net> 973 * src/text.c (do_linter): When the linter is called in restricted mode 974 (possible when nano was built with --disable-speller), it is better to 975 say that this function is disabled than that no linter was defined. 976 * src/nano.c (usage): When asking for --help in restricted mode, don't 977 show options that don't have any effect. 978 * src/nano.c (do_toggle): Make the four toggles that don't have any 979 effect in restricted mode say that they're disabled. 980 981 2015-07-28 Benno Schulenberg <bensberg@justemail.net> 982 * src/text.c (do_formatter), src/nano.c (allow_pending_sigwinch): 983 Reenable SIGWINCH-es also when invoking the formatter fails, and 984 correct some comments. 985 * src/text.c (do_linter, do_formatter): In restricted mode, no nanorc 986 files are read, so no linter or formatter will be defined, so these 987 routines will never be called. Also, the formatter will only ever 988 be called when a syntax applies to the current file and this syntax 989 defines a formatter, so there is no need to check this again. 990 991 2015-07-26 Benno Schulenberg <bensberg@justemail.net> 992 * src/search.c (do_replace_loop): When doing regex replacements, find 993 each zero-length match only once. This fixes Savannah bug #45626. 994 * src/global.c (shortcut_init, strtosc), src/search.c (do_findnext, 995 do_findprevious), doc/man/nanorc.5, doc/texinfo/nano.texi: Add two 996 new bindable functions, 'findnext' and 'findprevious', which repeat 997 the last search command in a fixed direction without prompting. 998 * src/global.c (shortcut_init): Tweak a string. 999 * src/search.c, src/move.c: Improve a few of the comments. 1000 * src/search.c (replace_regexp, replace_line): Rename two variables, 1001 and make the calculation of the new line size more symmetrical. 1002 1003 2015-07-25 Benno Schulenberg <bensberg@justemail.net> 1004 * src/global.c (shortcut_init, strtosc), src/files.c (savefile), 1005 doc/man/nanorc.5, doc/texinfo/nano.texi: Add a new bindable function, 1006 'savefile', which writes a file to disk without first asking for its 1007 name. This implements Savannah patch #8208 submitted by Seiya Nuta. 1008 1009 2015-07-23 Benno Schulenberg <bensberg@justemail.net> 1010 * doc/man/{nano.1,nanorc.5}, doc/texinfo/nano.texi: Add deprecation 1011 notices for the options 'set const', 'set poslog' and '--poslog'. 1012 Suggested by Eitan Adler. 1013 * doc/faq.html: Mention --disable-histories and --disable-libmagic. 1014 * src/chars.c (mbstrcasestr, mbrevstrcasestr): When searching, find 1015 only valid UTF-8 byte sequences. This fixes Savannah bug #45579, 1016 first reported in 2009 by Mike Frysinger. 1017 1018 2015-07-22 Mike Frysinger <vapier@gentoo.org> 1019 * src/files.c (check_dotnano), src/global.c (thanks_for_all_the_fish), 1020 src/rcfile.c (parse_binding): Plug a few memory leaks. 1021 1022 2015-07-19 Benno Schulenberg <bensberg@justemail.net> 1023 * src/nano.c (main): Accept again a +LINE argument for each file 1024 given on the command line. This fixes Savannah bug #45576. 1025 * src/nano.c (main): Adjust some comments and rewrap some lines. 1026 1027 2015-07-18 Benno Schulenberg <bensberg@justemail.net> 1028 * src/winio.c (edit_draw): When looking for multiline-regex matches, 1029 look for a new start only after an end, instead of right after the 1030 last start. This fixes bug #45525 and bug #41313 on Savannah. 1031 * src/nano.c, src/text.c, src/winio.c: Adjust some comments. 1032 * doc/faq.html: Fix a few typos and make some updates for 2.4.*. 1033 * ChangeLog: Make the release markers stand out more. 1034 1035 2015-07-17 Benno Schulenberg <bensberg@justemail.net> 1036 * src/files.c (open_buffer): Verify that a named and existing file 1037 is a normal file, to avoid opening an empty buffer when the name of 1038 a directory is specified. This fixes Savannah bug #45383 reported 1039 by Mike Frysinger, and also Savannah bug #27839 (which is an echo 1040 from Debian bug #551717 reported by Paul Wise). 1041 * src/files.c (load_history): Remove an earlier attempt to make M-W 1042 work at startup. It no longer worked because the assigned value gets 1043 overwritten by a later initialization of 'last_search' to the empty 1044 string. Found through the use of valgrind. 1045 * src/text.c (do_alt_speller): Avoid an unfounded warning about a 1046 possibly uninitialized variable. 1047 1048 2015-07-17 Mike Frysinger <vapier@gentoo.org> 1049 * src/browser.c (browser_refresh): Use the proper type (off_t) for 1050 the size of a file, and avoid warnings about too large bit shifts. 1051 1052 2015-07-15 Benno Schulenberg <bensberg@justemail.net> 1053 * src/nano.c, src/rcfile.c, doc/nanorc.sample.in, doc/man/nano.1, 1054 doc/man/nanorc.5, doc/texinfo/nano.texi, doc/syntax/nanorc.nanorc: 1055 Unabbreviate the long option --const to --constantshow, and --poslog 1056 to --positionlog, to be more understandable. 1057 * src/nano.h, src/global.c (add_to_sclist), src/help.c (help_init), 1058 src/rcfile.c (parse_binding), src/winio.c (get_shortcut): Rename 1059 the 'menu' item in the sc (shortcut) struct to 'menus', as it can 1060 refer to more than one menu. 1061 1062 2015-07-13 Benno Schulenberg <bensberg@justemail.net> 1063 * src/text.c (do_int_spell_fix, do_alt_speller): Remove an unneeded 1064 condition; 'added_magicline' can only be true when NO_NEWLINES isn't. 1065 * src/files.c (replace_buffer): Prevent a segfault when spellchecking 1066 a marked region and nonewlines isn't set. 1067 1068 2015-07-12 Benno Schulenberg <bensberg@justemail.net> 1069 * src/text.c (do_alt_speller): Rename the variable 'totsize_save' 1070 to 'size_of_surrounding', to better describe what it contains. 1071 * src/files.c (read_file): Remove a stray space from a message. 1072 1073 2015-07-10 Benno Schulenberg <bensberg@justemail.net> 1074 * src/nano.c (delete_opennode): Plug a small memory leak. 1075 * src/files.c (do_lockfile): Rename a variable; it does not contain 1076 the size of the file but the size of the name. 1077 * src/nano.c (do_toggle): Elide an unneeded variable. 1078 * src/files.c: Unwrap some lines and rewrap some others in a more 1079 congenial manner; tweak some comments and whitespace and braces. 1080 * src/files.c (read_line): Remove two lines of dead code. 1081 * src/files.c (read_line): Rearrange a few lines and some whitespace. 1082 1083 2015-07-06 Benno Schulenberg <bensberg@justemail.net> 1084 * src/global.c (add_to_sclist), src/help.c (help_init), src/nano.h, 1085 src/rcfile.c (parse_binding): When defining the toggles, give each 1086 of them a sequence number, so that, when they are rebound, they can 1087 still be listed in the original order in the help text. This fixes 1088 Savannah bug #45417. 1089 * src/text.c (do_undo): Make it clearer what WAS_FINAL_BACKSPACE does. 1090 * src/text.c (add_undo, do_deletion): Move the check for a Delete at 1091 the end-of-file to a less frequently travelled path. 1092 * src/text.c (do_deletion): If a Backspace happens at the end-of-file, 1093 don't remove and then re-add the magic line; just add an undo item. 1094 * src/help.c (help_init), src/text.c (do_undo): Adjust whitespace and 1095 bracing after the previous changes. 1096 1097 GNU nano 2.4.2 - 2015.07.05 1098 1099 2015-06-28 Benno Schulenberg <bensberg@justemail.net> 1100 * src/browser.c (browser_refresh): Limit the selected file to the 1101 available ones in the list -- after a refresh the number may have 1102 decreased. This fixes Savannah bug #45424. 1103 * src/text.c (do_deletion): There is no need to check again for the 1104 line ending -- it was done already in the encompassing 'if'. 1105 * src/text.c: Unwrap some lines, rewrap some others more logically, 1106 plus several other esthetic tweaks. 1107 * doc/syntax/xml.nanorc: Recognize many more kinds of XML files. 1108 This addresses Debian bug #790017 reported by Emmanuel Bourg. 1109 Also colour the strings in tags differently, and add some comments. 1110 1111 2015-06-27 Benno Schulenberg <bensberg@justemail.net> 1112 * src/text.c (do_undo, add_undo): Skip undoing a backspace *only* when 1113 it really tried to delete the final, magic newline. 1114 * src/nano.h, src/text.c: Rename three flags for clarity. 1115 * src/files.c (replace_buffer): This function is only ever called with 1116 a temporary file as parameter, so forget the case of an empty filename. 1117 Also, don't bother putting the pointer at the top of the buffer, as the 1118 first action after this function is to restore the cursor position. 1119 * src/files.c: Normalize whitespace and comments. 1120 * src/nano.h: Remove obsolete execute flag from the shortcut struct. 1121 * src/global.c (shortcut_init): Remove a duplicate binding of ^T, to 1122 prevent it being shown twice in the ^G help text. It will be rebound 1123 dynamically when for the current syntax another function is available. 1124 1125 2015-06-23 Benno Schulenberg <bensberg@justemail.net> 1126 * src/winio.c (edit_draw): Verify that there exists multidata for the 1127 found starting line before trying to use it. When a file is inserted 1128 (^R), it will not have any precalculated multidata associated with it. 1129 This fixes Savannah bug #45377 reported by Cody A. Taylor. 1130 1131 2015-06-20 Benno Schulenberg <bensberg@justemail.net> 1132 * src/search.c (do_research): If nothing was searched for yet during 1133 this run of nano, take the most recent item from the search history. 1134 This makes M-W work also right after startup, like <n> in vim/less. 1135 * src/utils.c (get_homedir): Keep homedir NULL when no home directory 1136 could be determined, so that nano will show a message about it. This 1137 is a fix for Savannah bug #45343. 1138 * doc/syntax/nanorc.nanorc: Colour key-binding lines affirmatively 1139 only when the specified menu name is an existing one. 1140 * doc/syntax/changelog.nanorc: Stop the changed-files colour from 1141 spilling beyond a blank line. Also highlight releases. 1142 * src/nano.c (main), src/rcfile.c: Remove the obsolete long option 1143 --undo. And sort --help and the softwrap option more consistently. 1144 1145 2015-06-18 Benno Schulenberg <bensberg@justemail.net> 1146 * src/rcfile.c: Allow a tiny nano's ~/.nanorc to enable search and 1147 position histories. Also sort the options more strictly. 1148 * src/nano.h: Delete two unused things, and add two comments. 1149 1150 2015-06-17 Benno Schulenberg <bensberg@justemail.net> 1151 * src/text.c (do_undo, add_undo): When undoing a Backspace at the tail 1152 of the file and nonewlines is not set, then don't add another newline 1153 but just reposition the cursor. Also, when doing a Delete at the tail 1154 of the file, don't add a superfluous undo structure. This prevents 1155 the appearance of an extra newline when undoing the Backspace/Delete. 1156 Patch partially by Mark Majeres. The problem was first reported in 1157 https://lists.gnu.org/archive/html/nano-devel/2015-06/msg00003.html. 1158 * src/text.c (do_undo): Adjust whitespace after the previous change. 1159 * src/text.c (add_undo): Elide an unneeded variable and correct two 1160 comments. And try to put the more frequent condition first. 1161 * src/text.c (add_undo): Rename the parameter 'current_action' to 1162 'action', to match the other functions. 1163 * src/text.c (do_undo, add_undo, update_undo): Improve the visibility 1164 of the undo-related debugging messages. 1165 1166 2015-06-14 Benno Schulenberg <bensberg@justemail.net> 1167 * src/winio.c (edit_draw): Add some debugging code to track which 1168 multidata codes (for multiline regexes) get assigned to which lines. 1169 * src/winio.c (edit_draw): Start and end regexes can be very similar; 1170 so if a found start has been qualified as an end earlier, believe it 1171 and skip to the next step. This helps with Python's docstrings. 1172 * src/winio.c (edit_draw): When the whole line has been coloured, 1173 don't bother looking for any more starts. This prevents some lines 1174 from being erroneously marked as CENDAFTER instead of CWHOLELINE. 1175 * src/*.c: Don't check for non-NULL before freeing; it's unneeded. 1176 1177 2015-06-11 Benno Schulenberg <bensberg@justemail.net> 1178 * src/winio.c (get_key_buffer): Add some debugging code to make it 1179 easy to see what codes a keystroke produces. 1180 1181 2015-06-07 Benno Schulenberg <bensberg@justemail.net> 1182 * doc/texinfo/nano.texi: Show the node with the command-line options 1183 in the main menu, to make it easy to find. 1184 * doc/texinfo/nano.texi: Improve some formatting, hyphenation, wording 1185 and dashes. And remove some confusing, historical things. 1186 * doc/man/nano.1, doc/man/nanorc.5, doc/texinfo/nano.texi: Clarify the 1187 meaning of --backupdir: it doesn't just specify a directory for saving 1188 backup files, it mainly causes uniquely numbered backups to be made. 1189 * doc/man/nano.1: Add a section on the non-obvious functioning of the 1190 cutbuffer and the mark. 1191 1192 2015-06-04 Benno Schulenberg <bensberg@justemail.net> 1193 * src/nano.h: Fix compilation with --enable-tiny. 1194 * nano.spec.in: Add the post-install and pre-uninstall rules for the 1195 Info document, plus some tweaks. (Patch was tested by Kamil Dudka.) 1196 1197 2015-06-02 Benno Schulenberg <bensberg@justemail.net> 1198 * doc/man/nanorc.5, doc/texinfo/nano.texi: Tweak some wordings, and 1199 add some missing formatting to the Info document, and fix an mdash. 1200 * doc/syntax/debian.nanorc: Colour also an optional option. 1201 This addresses Debian bug #664456 reported by Shawn Landden. 1202 Also shorten the name of the syntax to "sources.list". 1203 * doc/syntax/python.nanorc: Require again that the triple quote that 1204 starts a docstring is followed by some character -- it is better to 1205 *not* colour some strings than far too often colour far too much. 1206 This addresses Debian bug #785508 reported by Alexandre Detiste. 1207 1208 2015-05-31 Mahyar Abbaspour <mahyar.abaspour@gmail.com> 1209 * src/prompt.c (get_statusbar_page_start): Prevent a floating-point 1210 exception when the available length for an answer becomes zero. 1211 1212 2015-05-28 Benno Schulenberg <bensberg@justemail.net> 1213 * src/help.c (do_help), src/prompt.c (do_yesno_prompt): Normalize 1214 the whitespace after the recent changes in logic. 1215 * src/prompt.c (do_yesno_prompt): Use 'width' instead of hardcoded 1216 16. Also always first set the string and then position the cursor. 1217 * TODO: Mark window resizes and better file-type detection as done. 1218 * doc/syntax/debian.nanorc: Allow a CD name to contain any character. 1219 This addresses Debian bug #688892 reported by Dani Möller Montull. 1220 1221 2015-05-28 Mahyar Abbaspour <mahyar.abaspour@gmail.com> 1222 * src/nano.c (handle_sigwinch, regenerate_screen), src/global.c, 1223 src/prompt.c (do_statusbar_input, get_prompt_string, do_yesno_prompt), 1224 src/browser.c (do_browser, browser_refresh), src/help.c (do_help), 1225 src/winio.c (get_key_buffer, unget_input, get_input, parse_kbinput), 1226 src/text.c (do_justify, do_linter), src/nano.h, src/proto.h: 1227 Handle a SIGWINCH (signalling a change in window size) not when it 1228 happens but only when checking for input. Report the SIGWINCH via 1229 a special key value to the calling routine, to allow not only the 1230 main editor but also the help viewer and the file browser to adapt 1231 their display to the new size. (Patch edited by Benno.) 1232 1233 2015-05-20 Devrim Gündüz <devrim@gunduz.org> 1234 * doc/syntax/postgresql.nanorc: New file -- syntax highlighting for 1235 PostgreSQL, first posted as Savannah patch #8601. Trimmed by Benno. 1236 1237 2015-05-08 Benno Schulenberg <bensberg@justemail.net> 1238 * src/browser.c (browser_refresh): Take the distant possibility of 1239 terabyte files into account, and in the bargain get rid of the need 1240 to calculate the number of digits in UINT_MAX. 1241 * src/files.c (get_next_filename): Limit the number of backup files 1242 to one hundred thousand -- which should be far more than enough -- 1243 before finding an unused filename takes an annoying amount of time. 1244 * src/utils.c (digits): Delete this now unneeded function. 1245 1246 2015-05-03 Benno Schulenberg <bensberg@justemail.net> 1247 * src/browser.c (browser_refresh): Display an ellipsis only when the 1248 filename is longer than the available space, not when it still fits. 1249 * src/browser.c, src/nano.c: Adjust a few comments and line wrappings. 1250 * doc/syntax/groff.nanorc: Use character classes correctly. 1251 1252 2015-04-28 Benno Schulenberg <bensberg@justemail.net> 1253 * src/color.c (color_update): Match the file regex of a syntax against 1254 the absolute, canonical path instead of against the path the user gave. 1255 This fixes Savannah bug #44288, reported by Mike Frysinger. 1256 * doc/syntax/po.nanorc: Improve the colouring of message tags. 1257 * src/winio.c (get_escape_seq_kbinput): Unwrap a bunch of comments. 1258 1259 2015-04-25 Benno Schulenberg <bensberg@justemail.net> 1260 * src/search.c (do_replace_loop): Remove the unintended special 1261 case for replacing multiple occurrences of a literal ^ or $; see 1262 https://lists.gnu.org/archive/html/nano-devel/2015-04/msg00065.html. 1263 * src/search.c (findnextstr): Delete an always-FALSE parameter. 1264 * src/search.c (findnextstr): Rename the parameter 'whole_word' 1265 to 'whole_word_only', for clarity. 1266 1267 2015-04-21 Benno Schulenberg <bensberg@justemail.net> 1268 * src/browser.c (findnextfile): Save the settings of the global 1269 case-sens, direction, and regexp flags, and restore them on exit. 1270 And do this not in do_filesearch() but in findnextfile(), so that 1271 it will also work for do_fileresearch(). 1272 * src/text.c (do_int_spell_fix): Save and restore the global flags 1273 in the same short and quick way as above. 1274 * src/nano.c (main): Initialize the search and replace strings in 1275 a central place, to get rid of a bunch of ifs. 1276 * src/search.c (search_init_globals): Elide this tiny function. 1277 1278 2015-04-20 Benno Schulenberg <bensberg@justemail.net> 1279 * src/winio.c (need_horizontal_update, need_vertical_update): Fuse 1280 two identical functions into one: need_screen_update(). 1281 * src/prompt.c (need_statusbar_horizontal_update): Rename function 1282 to need_statusbar_update() as there is no vertical counterpart. 1283 * src/search.c (do_search, do_research): Delete redundant reprises 1284 of a regex search: finding an occurrence only at the very starting 1285 point of the search necessarily means it is the only occurrence. 1286 1287 2015-04-18 Benno Schulenberg <bensberg@justemail.net> 1288 * src/global.c, src/nano.c, doc/man/nanorc.5, doc/texinfo/nano.texi: 1289 Make the descriptions of the multibuffer feature more accurate. 1290 * src/winio.c (display_string): Make sure an invalid starting byte 1291 of a multibyte sequence is properly terminated, so that it doesn't 1292 pick up lingering bytes of any previous content. This prevents the 1293 displaying of ghosts -- characters that aren't really there -- when a 1294 file contains valid ánd invalid UTF-8 sequences. For an example see: 1295 https://lists.gnu.org/archive/html/nano-devel/2015-04/msg00052.html. 1296 Also make two comments more accurate: an invalid multibyte sequence 1297 will never be categorized as a control character or anything else. 1298 1299 2015-04-18 Mark Oteiza <mvoteiza@udel.edu> 1300 * doc/syntax/{python,ruby,sh,tex}.nanorc: Add a linter definition. 1301 * doc/syntax/elisp.nanorc: New file; syntax highlighting for Elisp. 1302 * doc/syntax/guile.nanorc: New file; syntax highlighting for Guile. 1303 1304 2015-04-17 Benno Schulenberg <bensberg@justemail.net> 1305 * src/text.c (do_alt_speller, do_linter, do_formatter): Distinguish 1306 a failure to launch the linter from receiving zero parsable lines; 1307 add a new function to glue together the invocation-error string. 1308 * src/global.c (shortcut_init): In the Help Viewer and File Browser, 1309 bind the unbound Home and End keys to goto_top and goto_bottom, to 1310 mimic the behaviour of these keys in file viewers and web browsers. 1311 Also show ^Y and ^V in the WhereisFile menu instead of M-\ and M-/, 1312 for similarity with the WhereIs menu. 1313 * src/global.c (shortcut_init): Arrange the movement keys in the File 1314 Browser in the order of ascending stride, as in the Help Viewer. 1315 1316 GNU nano 2.4.1 - 2015.04.14 1317 1318 2015-04-13 Benno Schulenberg <bensberg@justemail.net> 1319 * src/search.c (do_replace_loop): Fix compilation with --enable-tiny. 1320 * README: Mention also the Savannah page for reporting bugs. 1321 1322 2015-04-12 Benno Schulenberg <bensberg@justemail.net> 1323 * src/browser.c (filesearch_init): Stop M-\ and M-/ in WhereisFile 1324 menu (reached via ^R ^T ^W) from doing also an unrequested search 1325 after having performed their function. Fixes Savannah bug #44790. 1326 * src/global.c (shortcut_init): Rebind ^Y and ^V in the WhereisFile 1327 menu from the pointless page_up() and page_down() to the effective 1328 first_file() and last_file(). Also unbind some other useless keys. 1329 * src/browser.c (filesearch_init): Remove an unused variable, and 1330 adjust the introductory comment for the recently tweaked logic. 1331 * src/rcfile.c (parse_linter, parse_formatter): Use mallocstrcpy() 1332 in a correct manner; don't let it free an unrelated string. 1333 1334 2015-04-11 Benno Schulenberg <bensberg@justemail.net> 1335 * src/search.c (do_replace_loop): Do not split off the marked region 1336 into a separate partition, but do the replacings in the current one, 1337 taking good care to stay within the boundaries of the region. This 1338 fixes an undo bug where the first part of a line would disappear if 1339 the region started in the middle of a line. Bug was reported here: 1340 https://lists.gnu.org/archive/html/nano-devel/2015-03/msg00077.html. 1341 Original idea and patch were by Mark Majeres. 1342 1343 2015-04-08 Benno Schulenberg <bensberg@justemail.net> 1344 * src/browser.c (browser_select_dirname, findnextfile): Rename 1345 'currselected' to 'looking_at', for more contrast with 'selected', 1346 and rename browser_select_filename() to browser_select_dirname(). 1347 * src/text.c: Correct and adjust some comments. 1348 1349 2015-04-07 Benno Schulenberg <bensberg@justemail.net> 1350 * src/browser.c (do_fileresearch): Don't search for the empty string 1351 when nothing was sought yet (when historylog is set). 1352 * src/browser.c (filesearch_init): Remove an unfitting comment 1353 (there are no toggles here) and tweak some others. 1354 * src/search.c (do_search, do_research): Use the same variable as 1355 in the surrounding code, for consistency. 1356 * src/browser.c (findnextfile_wrap_reset): Elide this function, 1357 and rename 'search_last_file' to 'came_full_circle'. 1358 * src/browser.c (filesearch_init, do_fileresearch): Avoid setting 1359 'focusing' when searching only for filenames. 1360 * src/browser.c (findnextfile, do_filesearch, do_fileresearch): 1361 Greatly simplify the searching for the next matching filename. 1362 * src/{browser,files,help,prompt,text,winio}.c: Let the function 1363 bottombars() set the global variable 'currmenu' -- the displayed 1364 menu must necessarily be the active one. 1365 * src/browser.c (filesearch_abort): Elide this tiny function. 1366 * THANKS: Add the names of recent translators, and sort the list. 1367 * THANKS: A neater layout, plus two table headers. 1368 1369 2015-04-05 Benno Schulenberg <bensberg@justemail.net> 1370 * doc/texinfo/nano.texi: Expand on nano's features, condense the 1371 synopsis, and "online" means something else to most people. 1372 1373 2015-04-03 Benno Schulenberg <bensberg@justemail.net> 1374 * README: Update text to the fifth milestone, 2.4.x, plus tweaks. 1375 * src/rcfile.c: Remove two superfluous (because nested) #ifndefs. 1376 * src/rcfile.c (parse_rcfile): Ignore any magic when libmagic was 1377 disabled, and ignore a formatter when spell checking was disabled. 1378 1379 2015-03-28 Benno Schulenberg <bensberg@justemail.net> 1380 * src/search.c (search_init_globals, search_replace_abort), 1381 src/winio.c (edit_redraw), src/proto.h, src/global.c: When finding 1382 an off-screen string, put it on the center line of the screen and 1383 not on the bottom or top line. This restores the old behaviour 1384 that was unintentionally changed in r5149 six days ago. 1385 * src/winio.c (edit_refresh): When pasting lines on the bottom line, 1386 only scroll the required number of lines and not half a screen -- 1387 that is, when smooth scrolling is enabled. 1388 * doc/syntax/changelog.nanorc: Also colour a series of changed files 1389 that spans more than one line. 1390 1391 2015-03-27 Mark Majeres <mark@engine12.com> 1392 * src/text.c (do_alt_speller): Adjust the end point of the marked 1393 region for any change in length of the region's last line. 1394 1395 2015-03-27 Benno Schulenberg <bensberg@justemail.net> 1396 * doc/syntax/patch.nanorc: Recognize also Debian package diffs. 1397 Fixes https://bugs.launchpad.net/ubuntu/+source/nano/+bug/1300565 1398 requested by Rolf Leggewie. 1399 * src/search.c (do_replace_loop): Adjust some whitespace and wrapping. 1400 * src/search.c (do_replace_loop): Place a call to edit_refresh better, 1401 and remove two unneeded ones. This greatly speeds up nano when doing 1402 a Replace All with *lots* of occurrences. 1403 * src/{color,global,nano,text,utils}.c: Normalize some whitespace. 1404 * src/global.c (strtosc): The linter is only available when colour is. 1405 * src/global.c, src/text.c: Treat the formatter like a speller, to fix 1406 compilation with --disable-speller. Fixes Savannah bug #44607. 1407 1408 2015-03-25 Benno Schulenberg <bensberg@justemail.net> 1409 * doc/syntax/debian.nanorc: Slightly widen and relax the header regex. 1410 * doc/syntax/python.nanorc: Hashes inside triple-quoted strings should 1411 not cause comment colouring. (Inside single-qouted strings neither, 1412 but then quotes in comments will be coloured like strings.) This 1413 solves https://bugs.launchpad.net/ubuntu/+source/nano/+bug/481363. 1414 * src/global.c (strtomenu): Remove mistaken menu name -- as the 1415 formatter allows no interaction it needs no associated menu. 1416 * src/text.c (do_formatter): Remove unneeded statement -- nothing 1417 has changed the value of 'currmenu'. 1418 * src/global.c (strtosc), doc/man/nanorc.5: Allow rebinding the 1419 linter when nano was configured with --disable-speller. 1420 1421 2015-03-23 Benno Schulenberg <bensberg@justemail.net> 1422 * src/text.c (do_alt_speller): Avoid the spell checker reporting 1423 an error when the marked region is zero bytes long. The message 1424 is not needed -- it gets printed by the caller. This generalizes 1425 the fix for Savannah bug #29393. 1426 * src/text.c (do_alt_speller): Do not unset the mark before the 1427 possible bailout because of a zero-sized region. 1428 * NEWS: Option --noread allows writing, not reading, to named pipes. 1429 1430 2015-03-22 Chris Allegretta <chrisa@asty.org> 1431 * src/text.c (do_alt_speller): timestamp can just be a time_t. 1432 Fixes compilation on win32 and macOS. 1433 1434 GNU nano 2.4.0 - 2015.03.22 1435 1436 2015-03-22 Benno Schulenberg <bensberg@justemail.net> 1437 * src/chars.c (move_mbleft): Start looking for a multibyte char 1438 not at the start of the string, but only as far back as such a 1439 char can possibly be. Change suggested by Mark Majeres. 1440 * src/search.c (findnextstr): Step backward or forward not simply 1441 one byte but one character (possibly multibyte). Fixes Savannah 1442 bug #42175, reported by myself, and the finding of ghosts seen in 1443 https://lists.gnu.org/archive/html/nano-devel/2015-03/msg00055.html. 1444 * src/winio.c (edit_redraw): Do not center the current line when 1445 smooth scrolling is used. This fixes Savannah bug #42654. 1446 1447 2015-03-21 Benno Schulenberg <bensberg@justemail.net> 1448 * src/text.c (do_alt_speller): Remove some leftovers. 1449 * src/search.c: Place some comments better and unwrap some lines. 1450 1451 2015-03-21 Mark Majeres <mark@engine12.com> 1452 * src/text.c (do_alt_speller): Restore the positions of the mark 1453 and the cursor in a better way: to the columns where they were. 1454 This fixes Savannah bug #44542, reported by Benno Schulenberg. 1455 1456 2015-03-20 Benno Schulenberg <bensberg@justemail.net> 1457 * src/nano.c (finish_stdin_pager, cancel_stdin_pager, stdin_pager): 1458 Normalize the whitespace, remove an old comment, and place another 1459 one better. 1460 * src/text.c (do_undo): Make a message equal to another one. It 1461 was mistakenly changed in r4950. (This is translation-neutral.) 1462 * src/global.c (shortcut_init): Keep related items together in the 1463 ^G help screen. 1464 1465 2015-03-17 Benno Schulenberg <bensberg@justemail.net> 1466 * src/text.c (do_alt_speller): Do not set the modified flag when 1467 an external spell checker didn't make any changes. This fixes 1468 Savannah bug #44320, reported by Cody A. Taylor. 1469 1470 2015-03-14 Benno Schulenberg <bensberg@justemail.net> 1471 * src/text.c (do_formatter): Fix a message plus a few comments. 1472 1473 2015-03-14 Mark Majeres <mark@engine12.com> 1474 * src/nano.c (renumber): Get out if there is nothing to renumber, 1475 to prevent do_undo() from falling over trying to renumber emptiness. 1476 This fixes Savannah bug #44488, reported by Dennis Decker Jensen. 1477 1478 2015-03-08 Benno Schulenberg <bensberg@justemail.net> 1479 * src/proto.h, src/nano.c: Fix compilation with --enable-tiny plus 1480 --enable-nanorc. 1481 * src/rcfile.c (parse_binding): Fix the rebinding of toggles. 1482 * doc/man/{nano.1,rnano.1,nanorc.5}, doc/texinfo/nano.texi: Update 1483 years and version numbers in the docs in anticipation of a release. 1484 * src/nano.c (version): Drop compile time from version information 1485 to enable a reproducible build. Proposed by Jérémy Bobbio and Jordi 1486 Mallach (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=774388). 1487 1488 2015-03-07 Benno Schulenberg <bensberg@justemail.net> 1489 * doc/man/nanorc.5, doc/texinfo/nano.texi: Add a note about the 1490 inherent imperfection of using regular expressions for syntax 1491 highlighting, as suggested by Mike Frysinger in bug #30962. 1492 * doc/man/nanorc.5: Improve the indentation of some lists. 1493 * doc/man/nanorc.5, doc/texinfo/nano.texi: Remove the mistaken 1494 square brackets around the arguments of "header" and "magic" -- 1495 those arguments are not optional. Also add "formatter" to the 1496 texinfo document, and slightly improve its punctuation. 1497 1498 GNU nano 2.3.99pre3 - 2015.02.27 1499 1500 2015-02-25 Chris Allegretta <chrisa@asty.org> 1501 * src/rcfile.c (parse_binding): Add an exception for do_toggle() as 1502 rebinding toggles broke with r5022. (Fixed in r5134.) 1503 1504 2015-02-21 Benno Schulenberg <bensberg@justemail.net> 1505 * README: Fix the explanation of how to subscribe to a mailing list. 1506 * doc/syntax/{java,lua,python,ruby}.nanorc: Wrap some overlong lines. 1507 1508 2015-02-18 Mike Frysinger <vapier@gentoo.org> 1509 * doc/syntax/sh.nanorc: Recognize also dash, openrc and runscript. 1510 1511 2015-02-16 Mike Frysinger <vapier@gentoo.org> 1512 * .gitignore: Ignore the autotools 'compile' file. 1513 1514 2015-02-15 Benno Schulenberg <bensberg@justemail.net> 1515 * src/file.c (do_lockfile): Also show the name of the affected file 1516 when finding a lock file, for when many files are opened at once. 1517 * src/file.c (do_lockfile): The user does the editing, not the editor. 1518 1519 2015-02-09 Chris Allegretta <chrisa@asty.org> 1520 * nano.spec.in: Add dependency on texinfo, docdir files for 1521 RPM file creation. 1522 1523 GNU nano 2.3.99pre2 - 2015.02.06 1524 1525 2015-02-03 Alex Henrie <alexhenrie24@gmail.com> 1526 * src/cut.c (do_cut_text): Make sure to set modified even when 1527 using --enable-tiny. 1528 1529 2015-02-01 Kamil Dudka <kdudka@redhat.com> 1530 * src/files.c (write_lockfile): Avoid writing uninitialized bytes to 1531 the lock file -- a simple null_at() would not initialize the buffer. 1532 * src/files.c (do_lockfile): Make sure that 'lockprog' and 'lockuser' 1533 are terminated -- strncpy() does not guarantee that on its own. 1534 * src/files.c (do_lockfile): Avoid printing a wrong PID on the status 1535 bar due to treating serialized PID bytes as signed integers. This 1536 addresses https://bugzilla.redhat.com/1186384 reported by Don Swaner. 1537 * src/files.c (write_lockfile): Do not trim the nano version number 1538 -- snprintf() counts the trailing zero into the size limit. 1539 1540 2015-02-01 Benno Schulenberg <bensberg@justemail.net> 1541 * src/winio.c (do_credits): Add a general entry for all translators. 1542 * src/nano.c (version), src/winio.c (do_credits): Update the copyright 1543 years to include 2015. 1544 1545 2015-01-13 Chris Allegretta <chrisa@asty.org> 1546 * src/files.c (open_buffer): Check here for locking and properly 1547 handle choosing to not open a file when locked instead of in 1548 open_file(). Fixes Savannah bug #42373 reported by Benno Schulenberg. 1549 1550 GNU nano 2.3.99pre1 - 2015.01.06 1551 1552 2015-01-03 Chris Allegretta <chrisa@asty.org> 1553 * New formatter code to support syntaxes like Go that have tools to 1554 automatically lint and reformat the text (gofmt), which is lovely. 1555 Added rcfile option formatter, a function do_formatter() in text.c 1556 and some other calls. 1557 1558 2014-12-28 Benno Schulenberg <bensberg@justemail.net> 1559 * src/files.c (do_lockfile): Gettextize the "File being edited" 1560 prompt, and improve its wording. 1561 * src/winio.c (do_credits): Remove the names of past translators 1562 from the Easter-egg scroll. 1563 * THANKS: Add a missing historical translator name. 1564 * src/winio.c (do_credits): Add Mark to the scroll, for all his 1565 undo work, colouring nano's interface, and other patches. 1566 1567 2014-11-30 Benno Schulenberg <bensberg@justemail.net> 1568 * doc/syntax/spec.nanorc: Colorize %pretrans and %posttrans fully. 1569 Original patch from Savannah patch #8573 by Daniel Vrátil. 1570 1571 2014-09-21 Benno Schulenberg <bensberg@justemail.net> 1572 * doc/syntax/{perl,python,ruby,sh}.nanorc: Recognize also header 1573 lines of the form "#!/usr/bin/env thing" besides "#!/bin/thing". 1574 This fixes Savannah bug #43270 reported by Kitty. 1575 1576 2014-08-29 Benno Schulenberg <bensberg@justemail.net> 1577 * src/text.c (do_justify): Replace the old get_shortcut() wrapper 1578 with the new func_from_key(). 1579 1580 2014-08-10 Benno Schulenberg <bensberg@justemail.net> 1581 * doc/texinfo/nano.texi: Improve some wordings and formatting. 1582 1583 2014-08-07 Benno Schulenberg <bensberg@justemail.net> 1584 * doc/syntax/nanorc.nanorc: Remove a mistaken OR which causes a 1585 'Bad regex, empty (sub)expression' error on some systems. This 1586 fixes Savannah bug #42929 reported by Misty De Meo. 1587 1588 2014-08-03 Benno Schulenberg <bensberg@justemail.net> 1589 * doc/man/nano.1, doc/man/rnano.1: Tweak the formatting a bit so that 1590 po4a will create a nicer POT file. 1591 * doc/man/nanorc.5: Improve some of the wordings and formatting. 1592 1593 2014-08-02 Benno Schulenberg <bensberg@justemail.net> 1594 * doc/texinfo/nano.texi: Standardize the formatting of command-line 1595 options -- each one separately. Also add some more markup. 1596 1597 2014-08-01 Benno Schulenberg <bensberg@justemail.net> 1598 * doc/man/nano.1, doc/man/rnano.1: Separate short and long option 1599 by a comma instead of putting the long one between parentheses. 1600 And showing the required quotes around the argument of -Q. 1601 1602 2014-07-31 Benno Schulenberg <bensberg@justemail.net> 1603 * src/files.c (do_insertfile): Adjust some indentation. 1604 * src/prompt.c (do_statusbar_input), src/browser.c (do_browser): 1605 Reorder a few things, and adjust some whitespace. 1606 1607 2014-07-27 Benno Schulenberg <bensberg@justemail.net> 1608 * src/global.c (add_to_sclist): Remove the now unused and unneeded 1609 addition ability from this builder function of the shortcut list. 1610 * src/global.c (strtokeytype): Move this to a better place. 1611 * src/global.c (first_sc_for): Move this too to a better place. 1612 * src/prompt.c (do_yesno_prompt): Use the new and more direct 1613 func_from_key() wrapper instead of get_shortcut(). 1614 * src/text.c (do_linter): Likewise. 1615 * src/files.c (do_insertfile, do_writeout): Likewise. 1616 1617 2014-07-24 Jordi Mallach <jordi@gnu.org> 1618 * doc/texinfo/nano.texi, doc/man/nanorc.5: Typo fix. 1619 1620 2014-07-22 Benno Schulenberg <bensberg@justemail.net> 1621 * doc/syntax/nanorc.nanorc: Remove 'undo' from the valid options. 1622 1623 2014-07-21 Jordi Mallach <jordi@gnu.org> 1624 * doc/nanorc.sample.in: Remove ‘undo’ section which is now obsolete. 1625 1626 GNU nano 2.3.6 - 2014.07.17 1627 1628 2014-07-16 Jordi Mallach <jordi@gnu.org> 1629 * doc/man/rnano.1: Additional printing formatting improvement from 1630 Bjarni Ingi Gislason. 1631 1632 2014-07-16 Jordi Mallach <jordi@gnu.org> 1633 * doc/man/fr/nano.1, doc/man/fr/rnano.1: Apply similar escaping fixes 1634 to French manpages. 1635 * doc/man/fr/nano.1, doc/man/fr/rnano.1, doc/man/fr/nanorc.5: Recode 1636 as UTF-8. 1637 1638 2014-07-16 Jordi Mallach <jordi@gnu.org> 1639 * doc/syntax/debian.nanorc: Add https, tor and spacewalk to supported 1640 APT methods. 1641 * doc/syntax/debian.nanorc: Apply the syntax to apt/sources.list.d/ 1642 entries as well, as reported by Rodolphe Pelloux-Prayer. 1643 1644 2014-07-16 Jordi Mallach <jordi@gnu.org> 1645 * doc/man/nano.1, doc/man/rnano.1: Add some escaping and formatting 1646 fixes as suggested Bjarni Ingi Gislason <bjarniig@rhi.hi.is> in 1647 Debian bugs #662842 and #726956. 1648 1649 2014-07-16 Benno Schulenberg <bensberg@justemail.net> 1650 * src/text.c: Normalize the tabbing. 1651 1652 2014-07-16 Mark Majeres <mark@engine12.com> 1653 * src/text.c (do_undo): Make sure renumbering starts far enough back 1654 after undoing a cut or paste. This fixes a segmentation fault when 1655 undoing a repeated cutting and pasting of the first line of a file. 1656 * src/nano.c (move_to_filestruct, copy_from_filestruct): Fix two leaks. 1657 1658 2014-07-13 David Lawrence Ramsey <pooka109@gmail.com> 1659 * ChangeLog: Typo fix. 1660 1661 2014-07-12 Benno Schulenberg <bensberg@justemail.net> 1662 * configure.ac: The warning about datarootdir being ignored is 1663 not merely a warning, it also activates a workaround. 1664 1665 2014-07-11 Mark Majeres <mark@engine12.com> 1666 * src/text.c (do_undo, do_redo): Do not speak of "line wrap" 1667 but instead of "text add" when undoing/redoing text additions 1668 that caused automatic line breaks. 1669 1670 2014-07-11 Benno Schulenberg <bensberg@justemail.net> 1671 * src/files.c (write_lockfile): Refix typo in error message. 1672 1673 GNU nano 2.3.5 - 2014.07.11 1674 1675 2014-07-11 Chris Allegretta <chrisa@asty.org> 1676 * src/files.c (do_lockfile, open_file): If locking fails, 1677 allow the lock failure message to be preserved AND 1678 preserve the filename passed on the cmdline. Fixes 1679 Savannah bug #42668. 1680 1681 2014-07-02 Chris Allegretta <chrisa@asty.org> 1682 * src/files.c (do_lockfile): Check whether the directory 1683 of the file we're trying to lock exists, and make the 1684 resulting error message more intuitive. Fixes 1685 Savannah bug #42639 reported by Benno Schulenberg. 1686 1687 2014-07-02 Mark Majeres <mark@engine12.com> 1688 * src/text.c (undo_cut, redo_cut, update_undo): Handle the 1689 cases of cutting-from-cursor-to-end-of-line correctly. 1690 * src/nano.c (do_input): Don't preserve the cutbuffer when 1691 CUT_TO_END is toggled -- it would intermix two cut types. 1692 * src/text.c (redo_cut, do_undo, do_redo): Don't forget to 1693 free the cutbuffer after use. 1694 1695 2014-07-02 Benno Schulenberg <bensberg@justemail.net> 1696 * src/proto.h: Add a typedef for a pointer to a function. 1697 * src/global.c (func_from_key): New wrapper. 1698 * src/prompt.c (get_prompt_string, do_prompt): Use the new 1699 wrapper to make the code a bit cleaner. 1700 * src/help.c (do_help, parse_help_input): Use the wrapper. 1701 * src/browser.c (do_browser, parse_browser_input): Likewise. 1702 * src/search.c (search_init, do_gotolinecolumn): Likewise. 1703 * src/search.c (findnextstr): Replace a call of old wrapper 1704 'getfuncfromkey()' with a call of new 'func_from_key()'. 1705 * src/winio.c (getfuncfromkey): Delete now unneeded wrapper. 1706 * src/nano.c (usage, main), doc/texinfo/nano.texi: Properly 1707 exclude the --quiet option when --disable-nanorc was given. 1708 1709 2014-07-01 Benno Schulenberg <bensberg@justemail.net> 1710 * src/browser.c (do_browser), src/help.c (do_help): Make sure 1711 to always set 'currmenu', so that we can rely on it. 1712 * src/*.c (get_shortcut): Now that 'currmenu' is really global, 1713 stop passing it around. 1714 * src/help.c (help_init), src/winio.c (bottombars): There are 1715 no tagless functions, so there is no need to check. 1716 * src/prompt.c (do_prompt, get_prompt_string): Don't pass the 1717 menu, just set it earlier. 1718 * src/prompt.c (get_prompt_string): Group the arguments better. 1719 * src/global.c (shortcut_init), src/browser.c (do_filesearch): 1720 Show that it is possible to have backwards, regular-expressive 1721 and case-sensitive searching in the file browser. 1722 * src/browser.c (filesearch_init, do_filesearch): Now delete 1723 these abilities again and all provisions for them. 1724 * src/global.c (shortcut_init): Add two defines to make the 1725 functions list clearer. 1726 1727 2014-06-30 Mark Majeres <mark@engine12.com> 1728 * src/cut.c, src/global.c, src/nano.c: Rename 'cut_till_end' to 1729 'cut_till_eof', and 'do_cut_till_end' to 'do_cut_till_eof', to 1730 reduce confusion with CUT_TO_END, which is about end-of-line. 1731 1732 2014-06-30 Benno Schulenberg <bensberg@justemail.net> 1733 * src/color.c (color_update): When there are no syntaxes, for example 1734 with --ignorercfiles, do not try to find one, because that would lead 1735 to the magic database being searched, which slows down startup a lot. 1736 * src/color.c (color_update): Move some variables to a better place. 1737 * src/*: Make 'meta_key' and 'func_key' into global variables, instead 1738 of having them declared everywhere and passing them around endlessly. 1739 * src/global.c (sc_seq_or): Now fix a bug introduced somewhere after 1740 2.3.2 where binding a movement function to a Meta key would make the 1741 corresponding Arrow key stop working (producing a character instead). 1742 1743 2014-06-29 Benno Schulenberg <bensberg@justemail.net> 1744 * src/rcfile.c: Fix compilation with --enable-tiny --enable-nanorc. 1745 * src/winio.c (parse_kbinput, get_escape_seq_kbinput): Make Ctrl-Left 1746 and Ctrl-Right produce special codes, and map these codes to Prevword 1747 and Nextword instead of reducing them to a plain Left and Right. The 1748 codes 539 and 554 were so chosen because some terminals produce these. 1749 1750 2014-06-29 Mark Majeres <mark@engine12.com> 1751 * src/text.c (do_undo): Update the pointer to the bottom of the file 1752 when undoing line deletions at file's end. 1753 1754 2014-06-28 Benno Schulenberg <bensberg@justemail.net> 1755 * src/prompt.c (do_statusbar_input): Remove the useless parameters 1756 'have_shortcut and 'allow_funcs'; the latter is only ever TRUE. 1757 * src/global.c (shortcut_init), src/prompt.c (do_statusbar_input): 1758 Eradicate the execute flag -- it is only FALSE for functions that are 1759 empty placeholders (so executing them will not do anything anyway) or 1760 for functions ('total_refresh', 'do_suspend_void') that do not exist 1761 in menus with a prompt. The only two exceptions are 'do_cancel' and 1762 'do_gotolinecolumn_void'. The first is handled specially, so do that 1763 too for the second and then get to drop 140 parameters. 1764 * src/global.c (strtosc): Move recognition of the toggles to the end, 1765 use a single assignment of do_toggle_void, trim the unneeded braces. 1766 1767 2014-06-27 Benno Schulenberg <bensberg@justemail.net> 1768 * src/global.c (shortcut_init): Add default keybindings for Cut, 1769 PrevWord and NextWord in the prompt input lines; the code for those 1770 special operations already exists, just the shortcuts were missing. 1771 * src/rcfile.c (parse_binding): When binding keys, only allow those 1772 menus where the bound function is actually present. This reduces 1773 the meaning of 'all' to "all menus where the function exists". 1774 * src/rcfile.c (is_universal): New function, returning TRUE for the 1775 functions that are present in most menus but only listed in MMAIN. 1776 * doc/man/nanorc.5, doc/texinfo/nano.texi: Update the docs for this. 1777 * prompt.c (find_statusbar_bracket_match, do_statusbar_find_bracket): 1778 Remove these functions and thus the ability to search for a matching 1779 bracket in a prompt input line. The find_bracket function never had 1780 a default keybinding outside MMAIN, so is unlikely to have been used. 1781 * src/prompt.c (do_statusbar_input): Normalize the indentation. 1782 * src/winio.c: Normalize some whitespace. 1783 * Makefile.am, nano.spec.in: Stop distributing the BUGS file. 1784 * BUGS: Remove obsolete file, as all the bugs in it have been fixed 1785 long ago. Nowadays bugs are tracked on Savannah. 1786 * configure.ac: Silence a useless warning about ignoring datarootdir. 1787 1788 2014-06-25 Benno Schulenberg <bensberg@justemail.net> 1789 * src/browser.c (do_browser): Allow 'firstfile' and 'lastfile' to be 1790 rebound to Ctrl keys -- checking meta_key is wrong, the function has 1791 already been determined, that is all that matters. 1792 * src/help.c (do_help): Same thing for 'firstline'/'lastline'. 1793 1794 2014-06-23 Benno Schulenberg <bensberg@justemail.net> 1795 * src/nano.h, src/move.c (do_up, do_down), src/winio.c (edit_scroll): 1796 Rename UP_DIR and DOWN_DIR to UPWARD and DOWNWARD, for clarity. 1797 * src/proto.h, src/global.c, src/search.c: Rename 'no_replace_void()' 1798 to 'flip_replace_void()', to show what it actually does. 1799 * doc/man/nanorc.5, doc/texinfo/nano.texi: Update the docs for that. 1800 * src/global.c (strtosc): Add the bindable function 'gotodir'. 1801 * doc/man/nanorc.5, doc/texinfo/nano.texi: Document the bindable 1802 functions 'tofiles','gotodir' and 'flipnewbuffer', and correct 1803 the description of 'gototext' (not being about the file browser). 1804 * doc/syntax/nanorc.nanorc: Show Ins and Del as valid rebindable keys. 1805 * src/help.c (do_help): Normalize the indentation. 1806 * src/files.c (do_insertfile): Give audible feedback when flipping 1807 the new buffer to off is not allowed in view mode. 1808 1809 2014-06-22 Benno Schulenberg <bensberg@justemail.net> 1810 * src/browser.c (parse_browser_input), src/help.c (parse_help_input): 1811 Remove two pointless calls of get_shortcut(), and adjust the comments. 1812 * src/nano.c (do_toggle): When toggling softwrap, only the edit window 1813 needs to be refreshed, not the entire screen. 1814 * src/browser.c (do_browser): Remove superfluous abortion variable, 1815 and place two comments better. 1816 * src/text.c (do_redo): Rename 'undidmsg' to 'redidmsg', to be apt. 1817 1818 2014-06-22 Mark Majeres <mark@engine12.com> 1819 * src/text.c (do_redo): When redoing a line join at the tail 1820 of the file, make sure openfile->filebot is updated. 1821 * src/text.c (undo_cut, redo_cut, do_undo, add_undo, update_undo): 1822 Fix three leaks of the cutbuffer, shorten and regroup some stuff, 1823 and remove an unneeded iteration of cutbottom. 1824 1825 2014-06-21 Mark Majeres <mark@engine12.com> 1826 * src/text.c (undo_cut, add_undo): When undoing a cut-till-eof, 1827 put the cursor back where the cut started, and not at the end. 1828 * src/text.c (do_undo): When undoing a line break at the tail 1829 of the file, make sure openfile->filebot is updated. 1830 1831 2014-06-21 David Lawrence Ramsey <pooka109@gmail.com> 1832 * src/move.c, src/nano.c: Miscellaneous whitespace fixes, one 1833 type fix, and one more #ifdef NANO_TINY. 1834 1835 2014-06-20 Benno Schulenberg <bensberg@justemail.net> 1836 * src/proto.h, src/global.c: Remove two obsolete variables and an 1837 unneeded extern, and regroup some stuff. 1838 * src/files.c (check_dotnano): Wrap long lines and actually report 1839 the name that is not a directory. 1840 * src/*: Miscellaneous whitespace adjustments and comment tweaks. 1841 * src/files.c: Fix compilation with --enable-tiny --enable-browser. 1842 * doc/man/nano.1, doc/texinfo/nano.texi: History logging no longer 1843 depends upon nanorc support, plus many other tweaks. 1844 * src/global.c (strtosc): Fix compilation with --enable-tiny 1845 --enable-histories --enable-nanorc. 1846 * src/text.c: Fix compilation with --enable-tiny --enable-wrapping. 1847 * src/files.c (do_insertfile): Fix compilation with --enable-tiny 1848 --enable-histories --enable-multibuffer. 1849 * src/nano.c: Fix compilation with --enable-tiny --enable-mouse. 1850 * doc/man/nanorc.5, doc/texinfo/nano.texi: Explain better what "all" 1851 means when rebinding keys. This is a fix for Savannah bug #42552. 1852 * src/nano.c (main): Make +1 and +,1 start on line one column one, 1853 overriding a historical position. This fixes Savannah bug #42538. 1854 1855 2014-06-19 Benno Schulenberg <bensberg@justemail.net> 1856 * src/nano.c (window_init): Rename 'no_more_space()' to 'more_space()' 1857 for consistency, and tweak the related comments. 1858 * src/files.c: Update some comments to match the current status. 1859 * src/nano (finish, main): Allow -H/--historylog and -P/--poslog to 1860 function also when -I/--ignorercfiles is given. 1861 * configure.ac: Add a --disable-histories flag, to disable the code 1862 for the histories of search/replace strings and cursor positions. 1863 * doc/texinfo/nano.texi: Document the new configure flag. 1864 * src/*: Transform many DISABLE_NANORC to the new DISABLE_HISTORIES. 1865 This completes the fix for Savannah bug #42539. 1866 1867 2014-06-18 Benno Schulenberg <bensberg@justemail.net> 1868 * src/text.c: Rename 'to_end' to 'to_eof', to lessen confusion 1869 with CUT_TO_END (which is about cutting to end-of-line). 1870 * src/text.c: Upon better thought, elide the unneeded 'to_eof'. 1871 * src/text.c: And elide a totally unused 'strdata2'. 1872 * src/text.c: Rename the undo type UNSPLIT to JOIN, for clarity. 1873 * src/global.c, src/rcfile.c: Rename function_type to key_type. 1874 * src/text.c (break_line): Remove a condition and a break that 1875 cancel each other. 1876 1877 2014-06-18 Mark Majeres <mark@engine12.com> 1878 * src/text.c (add_undo): Don't start a new undo for CUT when the 1879 cutbuffer is being preserved, because then the cuts are contiguous 1880 and will form a single undo item. And make sure the cutbuffer will 1881 be cleared when a new undo item for CUT is created. 1882 * src/cut.c (keeping_cutbuffer): New function, to access the status 1883 of 'keep_cutbuffer' from the undo/redo code in src/text.c. 1884 * src/cut.c (do_copy_text): Blow away the contents of the cutbuffer 1885 if the mark is set or the cursor has moved between two copy commands. 1886 1887 2014-06-17 Mark Majeres <mark@engine12.com> 1888 * src/text.c (do_undo, do_redo): After an undo or redo, update the 1889 'placewewant' (the desired horizontal position of the cursor). 1890 1891 2014-06-17 Benno Schulenberg <bensberg@justemail.net> 1892 * src/text.c (do_undo, do_redo): Remove obsolete boolean variable. 1893 * doc/man/nano.1, doc/man/nanorc.5, doc/texinfo/nano.texi: Replace 1894 SYSCONFDIR with an absolute path or a circumlocution, as suggested 1895 by Mike Frysinger, plus some other tweaks. 1896 1897 2014-06-16 David Lawrence Ramsey <pooka109@gmail.com> 1898 * src/nano.c (do_exit): Display the message "No file name" on the 1899 statusbar for two seconds when --tempfile was given and the current 1900 buffer has no name. This fixes Savannah bug #41750. 1901 1902 2014-06-16 Benno Schulenberg <bensberg@justemail.net> 1903 * configure.ac: For the sake of statically linked systems, make sure 1904 the compiler also links against libz, which is used by libmagic. 1905 This fixes Savannah bug #38378, reported by Alan Hourihane. 1906 * src/nano.c (do_mouse, do_input): Don't bother returning zero when 1907 the cursor moved, just reset the cutbuffer directly. This avoids an 1908 "Unknown Command" message on every cursor-positioning mouse click. 1909 * src/nano.c (do_mouse): Put a common statement outside of then/else. 1910 * src/Makefile.am: Remove -I m4; it is needed only at the top level. 1911 * Makefile.am: Trim the contents of EXTRA_DIST to what is required. 1912 * doc/man/nano.1, doc/man/nanorc.5, doc/texinfo/nano.texi: Update 1913 the docs for the changed location of nano's search history. 1914 * doc/man/nano.1, doc/man/nanorc.5, doc/texinfo/nano.texi: Change 1915 some wordings, triggered by Savannah bug #42539. 1916 1917 2014-06-14 Mark Majeres <mark@engine12.com> 1918 * src/nano.h, src/text.c (undo_cut, update_undo): When undoing a 1919 backwards cut, put the cursor back in front of it, where it was. 1920 1921 2014-06-13 Benno Schulenberg <bensberg@justemail.net> 1922 * src/nano.c (do_input): Repositioning the cursor with the mouse 1923 (result == 0) should break a series of ^Ks. 1924 * src/nano.c (do_mouse): Clicking on the titlebar or the statusbar 1925 should not break a series of ^Ks, thus result must not be zero. 1926 * src/nano.c (do_input): A toggle should not break a series of ^Ks. 1927 * src/winio.c (get_shortcut): Do not treat holding both Control and 1928 Meta the same as holding only Control. 1929 * src/global.c, src/rcfile.c, src/nano.h, src/nano.c, src/text.c: 1930 Remove the --undo option, having the undo functions always enabled. 1931 If wished, the user can unbind them. This fixes Savannah bug #42456. 1932 * doc/man/{nano.1,nanorc.5}, doc/texinfo/nano.texi: Update the docs. 1933 * nano.spec.in: Remove useless info dir file from the build directory, 1934 don't clean this directory first, it's unnecessary, add a suggestion 1935 for a pico symlink, and update the license and the source URL. 1936 1937 2014-06-11 Benno Schulenberg <bensberg@justemail.net> 1938 * src/winio.c (get_mouseinput): Produce the correct return value for 1939 when a mouse event reinserted something into the keyboard buffer. 1940 * src/nano.c (do_input): Do not continue when there is a spurious 1941 mouse event (a touch of the touchpad, for example) but get out. 1942 Continuing would result in the cutbuffer being cleared upon the 1943 next cut. These two changes together fix Savannah bug #42326. 1944 * src/nano.c (do_input): Always accept mouse events, also when 1945 just looking for Unjustify. This fixes Savannah bug #42322. 1946 * src/nano.c (do_input): Remove a superfluous switch statement. 1947 * src/winio.c (get_mouseinput): Set the type of a reinserted key, 1948 also when it is a function key. This fixes Savannah bug #42092. 1949 1950 2014-06-10 Benno Schulenberg <bensberg@justemail.net> 1951 * src/browser.c, src/files.c, src/nano.c src/prompt.c, src/winio.c: 1952 A few minimalistic whitespace adjustments. 1953 * src/rcfile.c (check_bad_binding): Avoid a compiler warning. 1954 1955 2014-06-10 David Lawrence Ramsey <pooka109@gmail.com> 1956 * src/winio.c: One more type fix and two tiny message tweaks. 1957 1958 2014-06-09 David Lawrence Ramsey <pooka109@gmail.com> 1959 * src/*.c: Cosmetic tweaks of comments and whitespace. 1960 * src/help.c, src/rcfile.c, src/winio.c: Elide a function call by 1961 not comparing with an empty string but checking for the final \0. 1962 * src/files.c, src/nano.c, src/text.c, src/winio.c: Type fixes in 1963 debugging stuff -- line numbers are long, x positions unsigned long. 1964 * src/files.c, src/move.c, src/nano.c, src/text.c, src/winio.c: 1965 Make tiny nano a bit tinier by preening out some soft-wrap stuff. 1966 * src/global.c, src/nano.c, src/winio.c: A few more cosmetic tweaks 1967 (whitespace, order, braces, parentheses, and a typo) and type fixes. 1968 1969 2014-06-09 Benno Schulenberg <bensberg@justemail.net> 1970 * src/nano.c (do_input): Remove two superfluous false conditions. 1971 * src/nano.h, src/text.c (add_undo): Avoid a compiler warning with 1972 --disable-wrapping. 1973 1974 2014-06-09 Mark Majeres <mark@engine12.com> 1975 * src/text.c (do_undo, do_redo, add_undo, update_undo, do-wrap): 1976 Rewrite the line-wrapping code to make use of the existing line-break 1977 code. And undo line wraps together with their causal text additions, 1978 and not as separate actions because the user did not make them. 1979 1980 2014-06-08 Mark Majeres <mark@engine12.com> 1981 * src/text.c (do_delete, do_deletion, do_undo, do_redo, update_undo): 1982 Differentiate between undoing a Delete and undoing a Backspace -- the 1983 cursor should be in a slightly but significantly different position. 1984 1985 2014-06-04 Benno Schulenberg <bensberg@justemail.net> 1986 * src/global.c (shortcut_init), src/files.c (do_insertfile): Rename 1987 'ext_cmd_void' to 'flip_execute_void' to better match what it does. 1988 * src/global.c (strtosc), doc/man/nanorc.5, doc/texinfo/nano.texi: 1989 Add function name 'flipexecute' to enable rebinding ^X in the menus 1990 Read File and Execute Command. 1991 1992 2014-06-04 David Lawrence Ramsey <pooka109@gmail.com> 1993 * src/*.c: Adjustments of whitespace and comments. 1994 * doc/nanorc.sample.in: Interpunction tweaks. 1995 * src/global.c (add_to_funcs): Add cast to subnfunc* for nmalloc(). 1996 * src/files.c (do_lockfile): Properly make the variable 'lockfilesize' 1997 a size_t instead of a ssize_t, since it holds the result of strlen(). 1998 And use charalloc() instead of (char *)nmalloc(). 1999 * src/text.c (do_undo): Use charealloc() and not (char *)nrealloc(). 2000 * src/text.c (add_undo): Make use of null_at() to both null-terminate 2001 the multibyte character and align it to use only the amount of memory 2002 necessary. 2003 2004 GNU nano 2.3.4 - 2014.06.02 2005 2006 2014-06-02 Chris Allegretta <chrisa@asty.org> 2007 * doc/syntax/default.nanorc: Can't do trailing spaces in the 2008 default syntax or it will highlight the spaces as you type them 2009 into a new file, which for non-programming is infuriating. 2010 2011 2014-05-29 Mark Majeres <mark@engine12.com> 2012 * src/text.c (do_delete): For the undo structure, differentiate 2013 between deleting a newline and any other character. 2014 2015 2014-05-29 Chris Allegretta <chrisa@asty.org> 2016 * src/chars.c (addstrings): This function needs to be available even 2017 on non-utf-8 systems. 2018 * nano-regress: Added --disable-utf8 to regression check. 2019 2020 GNU nano 2.3.3 - 2014.05.29 2021 2022 2014-05-28 Chris Allegretta <chrisa@asty.org> 2023 * doc/syntax/mutt.nanorc: Include Benno's awesome signature 2024 matcher, modified slightly to also work for quoted sigs. 2025 * doc/syntax/default.nanorc: Be far more gentle with something 2026 which affects every file which doesn't match another syntax, and 2027 the user may not be able to override if their distro turns on 2028 highlighting by default. 2029 2030 2014-05-28 Benno Schulenberg <bensberg@justemail.net> 2031 * src/nano.c (do_input): Remove the three unused parameters 's_or_t', 2032 'ran_func', and 'finished'. They are only ever set and never used. 2033 * src/text.c (do_justify): Adjust a call of do_input(). 2034 * src/browser (do_browser): Actually translate the go-to-dir prompt. 2035 * src/browser, src/search.c: There is no need to repeat translator 2036 comments for the same string -- once is enough to get them included. 2037 Add instead some translator comments for the prompts. 2038 * src/global.c (shortcut_init): Make ^X in the Read-File menu toggle 2039 between executing a command and inserting a file. The mechanism in 2040 do_insertfile() in files.c is already present -- in the past just 2041 the wrong function was used in the relevant function-list item: 2042 'do_insertfile_void' instead of the unintuitive 'ext_cmd_void'. 2043 * src/browser (filesearch_init): Remove an unneeded format specifier. 2044 * src/nano.c (usage): Add a translator comment for the --help output. 2045 * src/global.c (shortcut_init): Elide four unneeded tags. 2046 * src/global.c (shortcut_init): Make tiny nano just a bit tinier. 2047 * src/global.c (shortcut_init): Standardize the add_to_funcs() calls, 2048 breaking always between the menus and the tag. 2049 2050 2014-05-27 Chris Allegretta <chrisa@asty.org> 2051 * src/winio.c (edit_refresh): wredrawln() is not supported under 2052 slang. 2053 2054 2014-05-27 Benno Schulenberg <bensberg@justemail.net> 2055 * src/global.c (shortcut_init): Improve the arrangement of help items 2056 under certain compilation conditions. 2057 * src/global.c (strtosc): Make tiny nano a bit tinier. 2058 * src/global.c (strtosc): Allow rebinding 'suspend' in tiny nano. 2059 * src/winio.c (set_modified): Adjust translator comment to make it 2060 show up in the POT file, and make it take the "[ ]" into account. 2061 2062 2014-05-26 Benno Schulenberg <bensberg@justemail.net> 2063 * src/cut.c (cut_line): Fix compilation with --enable-tiny. 2064 * src/text.c (do_linter): Avoid a warning with --enable-tiny. 2065 * src/global.c (shortcut_init): Unwrap some lines, and reorder two. 2066 2067 2014-05-25 Benno Schulenberg <bensberg@justemail.net> 2068 * src/global.c: Cut down on the size of tiny nano, by not compiling 2069 the function strtosc() when --disable-nanorc is given or implied. 2070 2071 2014-05-25 Mark Majeres <mark@engine12.com> 2072 * src/chars.c (addstrings): New function, concatenates two allocated 2073 strings, tacking the second onto the first and freeing the second. 2074 * src/cut.c (do_uncut_text): Update the undo structure for a paste. 2075 * src/text.c (undo_cut, redo_cut, add_undo, update_undo): Place the 2076 cursor after an undo there where it was before the do, and handle 2077 multibyte characters correctly. 2078 2079 2014-05-23 Benno Schulenberg <bensberg@justemail.net> 2080 * src/winio.c (edit_draw): Finally, the proper fix for bug #31743; 2081 telling ncurses to really redraw the line, without optimization, so 2082 it will not mistakenly assume that a wide character at the start of 2083 a line takes up just one column. This deletes the workaround that 2084 had the side effect of creating pastes full of trailing whitespace. 2085 2086 2014-05-19 Mark Majeres <mark@engine12.com> 2087 * src/winio.c (edit_draw): Paint the current line *after* tickling the 2088 terminal, so that the character in the final column will be displayed 2089 properly. Bug was introduced five days ago. 2090 2091 2014-05-18 Benno Schulenberg <bensberg@justemail.net> 2092 * src/nano (precalc_multicolorinfo): Do not match the ^ anchor when 2093 looking further on in a line. This prevents an end="^$" from being 2094 sometimes mistakenly matched. Fix inspired by Savannah bug #27708. 2095 * doc/syntax/default.nanorc: New file, example for a default syntax. 2096 2097 2014-05-17 Benno Schulenberg <bensberg@justemail.net> 2098 * doc/syntax/json.nanorc: New file, originally from Aapo Rantalainen, 2099 but edited, extended, and improved. See Savannah patch #7410. 2100 * src/winio.c (edit_draw): Do not skip the colour-off commands at the 2101 end of the loop. Based on Savannah patch #7550 by Ryan Lothian. 2102 This fixes bug #26111 reported by Dave Geering <dreamlax@Savannah>. 2103 2104 2014-05-16 Benno Schulenberg <bensberg@justemail.net> 2105 * src/text.c, src/winio.c: Remove some more double spaces. 2106 * doc/syntax/patch.nanorc: Show trailing whitespace on added lines. 2107 * doc/syntax/debian.nanorc: Make the component colouring simpler, 2108 and the URI colouring completer, and improve the comments. 2109 * doc/syntax/*.nanorc: Harmonize (partially) the syntax files. 2110 2111 2014-05-16 David Lawrence Ramsey <pooka109@gmail.com> 2112 * src/color.c, src/cut.c, src/text.c: Tweak some whitespace. 2113 * src/global.c, src/move.c: Use TRUE and FALSE instead of 1 and 0. 2114 * src/winio.c (edit_draw): Mention the name of the tickling character. 2115 * src/search.c (goto_line_posx): Remove unneeded call of edit_refresh. 2116 * src/text.c (do_undo, do_redo): Use size_t for line lengths. 2117 2118 2014-05-15 Mark Majeres <mark@engine12.com> 2119 * src/*, but mainly src/text.c (undo_cut, redo_cut, do_undo, do_redo): 2120 Go to the correct positions for undoing/redoing the cuts and pastes. 2121 This fixes several undo problems and Savannah bug #25585. 2122 2123 2014-05-15 Benno Schulenberg <bensberg@justemail.net> 2124 * doc/syntax/c.nanorc: Improve the magic regex, plus tweaks. 2125 * src/color.c (color_update): Adjust a comment, and be clearer. 2126 * src/nano.h: Improve two comments, and elide one macro. 2127 * doc/syntax/Makefile.am: Add texinfo.nanorc to the packing list. 2128 2129 2014-05-14 Benno Schulenberg <bensberg@justemail.net> 2130 * src/winio.c (edit_draw): Poke a non-breaking space into the last 2131 column of every line, to startle the terminal into handling wide, 2132 two-column characters properly. This fixes Savannah bug #31743. 2133 * src/nano.c (precalc_multicolorinfo): Improve debugging messages, 2134 and remove superfluous assignment (fileptr already equals endptr). 2135 * src/color.c (color_update): Move magic check to after headerline. 2136 * src/color.c (color_update): Open the magic database only when 2137 actually going to use it, and close it afterward. 2138 * doc/syntax/{perl.nanorc,xml.nanorc}: Improve two magic regexes. 2139 * src/color.c (color_update): Stop seeking when a magic matched. 2140 * doc/nanorc.sample.in: Add an example of colouring nano's interface 2141 elements, and tweak some of the other descriptions. 2142 2143 2014-05-13 Benno Schulenberg <bensberg@justemail.net> 2144 * src/text.c (do_linter): Make an error message somewhat clearer. 2145 * src/rcfile.c (parse_binding): Improve another error message. 2146 * doc/syntax/nanorc.nanorc: Show key names like M-6 and M-/ as valid. 2147 * src/global.c (thanks_for_all_the_fish): Upon exit also free the 2148 lists with functions and shortcuts. 2149 * src/*.c: Several random whitespace and comment tweaks. 2150 * src/global.c (replace_scs_for): Condense the function a bit. 2151 * src/help.c (help_init): No need to keep looping when two are found. 2152 * src/global.c: Improve compilation with --disable-browser. 2153 * src/nano.h, src/*.c: A few more comment tweaks. 2154 2155 2014-05-12 Benno Schulenberg <bensberg@justemail.net> 2156 * src/text.c (do_spell): Provide startup feedback, as for the linter. 2157 * doc/syntax/nanorc.nanorc: Show bright foreground colours as valid. 2158 * src/rcfile.c: Improve some comments, and remove some others that 2159 are mispasted or superfluous. 2160 * doc/texinfo/nano.texi: Add missing parenthesis, remove blank line. 2161 * src/rcfile.c (parse_magictype, parse_headers): Handle the libmagic 2162 and headerline regexes in the same manner, eliding a static variable 2163 while renaming some others. 2164 * src/*.h, src/rcfile.c (parse_magictype, parse_headers): Rename them 2165 to parse_magic_exp() and parse_header_exp() to be more fitting, further 2166 symmetrify them, and improve some comments. 2167 * src/nano.h, src/color.c, src/global.c, src/rcfile.c: Rename struct 2168 type 'exttype' to 'regexlisttype', to better match its functions, and 2169 upon exit also free the regexes for libmagic results and headerlines. 2170 * doc/syntax/python.nanorc: Improve the multiline regexes, make the 2171 one with single quotes work again, and add some comments. 2172 * doc/syntax/{man,python,fortran}.nanorc: Add regexes for comments, 2173 trailing whitespace and reminders, and trim some trailing spaces. 2174 * src/rcfile.c: Move parse_magic_exp() next to its sister. 2175 * src/color.c (color_update): Rename a variable, and elide another. 2176 2177 2014-05-10 Chris Allegretta <chrisa@asty.org> 2178 * src/rcfile.c (parse_color_names): Redefine false and true to 2179 their appropriate macro names so --with-slang works (slangv2 anyway). 2180 * src/text.c (do_linter): Care about whether user cancelled the file 2181 save (cancel the operation) versus just said no (continue but don't 2182 save the file). Also doupdate() after statusbar message that 2183 linter is being invoked and blank the shortcuts to draw the eye. 2184 Also allow user to cancel at the "open in a new buffer" prompt. 2185 New function lint_cleanup(). Fixes Savannah bug #42203. 2186 2187 2014-05-10 Benno Schulenberg <bensberg@justemail.net> 2188 * doc/texinfo/nano.texi: Make syntax highlighting into a separate 2189 section, and add the still missing section on rebinding keys. 2190 2191 2014-05-10 Mark Majeres <mark@engine12.com> 2192 * src/*.h, src/*.c: Make it possible for the foreground colour of 2193 interface elements to be bright. 2194 2195 2014-05-09 Benno Schulenberg <bensberg@justemail.net> 2196 * src/winio.c (get_mouseinput): Count only shortcuts that are actually 2197 shown, so that clicking on the ones after ^T (Speller/Linter) will work 2198 again correctly. This fixes the second part of Savannah bug #42093. 2199 * src/global.c (shortcut_init, strtosc): Do not define nor accept 2200 shortcuts for functions that are disabled. 2201 * src/global.c (shortcut_init, strtosc): Define shortcut for the linter 2202 when speller is disabled, and fix compilation with --disable-speller. 2203 * src/global.c (shortcut_init, strtosc), doc/man/nanorc.5: Put softwrap 2204 back among the "Appearance" toggles. 2205 * doc/man/nanorc.5: Describe bindable functions in the third person. 2206 2207 2014-05-06 Benno Schulenberg <bensberg@justemail.net> 2208 * doc/texinfo/nano.texi: Let makeinfo figure out the node pointers. 2209 * doc/syntax/texinfo.nanorc: New file, colouring for Texinfo files. 2210 * doc/texinfo/nano.texi: Add sections on the Cutbuffer and the Mark, 2211 remove option '-?', and make some other tweaks. 2212 * doc/man/{nano.1,nanorc.5}, doc/texinfo/nano.texi: Synchronize the 2213 documentation, and tweak some wording here and there. 2214 * doc/syntax/texinfo.nanorc: Stop the brace content from spilling. 2215 2216 2014-05-05 Benno Schulenberg <bensberg@justemail.net> 2217 * doc/man/nanorc.5: Give syntax highlighting its own section, 2218 add the "header" command, tweak some wording and formatting, 2219 and trim some duplicate introductory information. 2220 * src/global.c (strtosc), doc/man/nanorc.5: Allow the function 2221 do_cut_till_end (naming it "cutrestoffile") to be rebound. 2222 * doc/syntax/nanorc.nanorc: Add the four new *color options. 2223 * doc/syntax/nanorc.nanorc: Differentiate between options that 2224 take an argument and those that don't. 2225 2226 2014-05-04 Benno Schulenberg <bensberg@justemail.net> 2227 * src/winio.c (statusbar): Elide a variable. 2228 * src/*: Rename the variable 'reverse_attr' to 'hilite_attribute', 2229 and remove an unneeded call of wattroff(). 2230 * doc/man/nanorc.5, doc/texinfo/nano.tex: Document the settings 2231 of titlecolor, statuscolor, keycolor and functioncolor. 2232 * doc/man/nanorc.5, doc/texinfo/nano.tex: Show quotes where quotes 2233 are needed, remove some unneeded spaces, and do other tweaks. 2234 * src/global.c (strtosc), doc/man/nanorc.5: Allow the Backwards 2235 toggle to be rebound, document it, and document Backspace too. 2236 2237 2014-05-03 Benno Schulenberg <bensberg@justemail.net> 2238 * src/*.h, src/*.c: Add the ability to colour four elements of 2239 nano's interface differently: title bar, status bar, key combo, 2240 and function tag. Idea and original patch #8421 by Mark Majeres. 2241 * src/global.c (shortcut_init): Unfold long lines consistently. 2242 * src/global.c (shortcut_init): Order the shortcuts in roughly 2243 the same manner as in the help lines, and group them per menu. 2244 * src/global.c (shortcut_init): Remove the search-mode toggles 2245 from the inappropriate WHEREISFILE and REPLACEWITH menus. 2246 * src/global.c (shortcut_init): Paragraph jumping only makes 2247 sense in the main editing menu; remove it from all others. 2248 2249 2014-04-30 Benno Schulenberg <bensberg@justemail.net> 2250 * src/*, doc/*: Update the years in the copyright notices -- there 2251 were releases in 2010, 2011, and 2013, and there will be in 2014. 2252 2253 2014-04-27 Benno Schulenberg <bensberg@justemail.net> 2254 * src/nano.c (usage, main): Don't blurt out the full help text 2255 but just a hint when the command line contains some mistake, to 2256 avoid drowning out the error message. 2257 * src/nano.c (usage): Mention only those options that actually do 2258 something. For the no-op compat flags the man page is the place. 2259 * src/global.c (shortcut_init): In the help lines of Search/Replace 2260 show the important toggles early on, and group them better. 2261 * src/global.c (shortcut_init): Improve order and grouping in the 2262 main help text and help lines. 2263 * src/global.c (strtosc): Fix compilation with --enable-tiny. 2264 * src/global.c (shortcut_init): Improve the order of the help items 2265 still further, and make them also group nicely in the tiny version. 2266 2267 2014-04-27 Mark Majeres <mark@engine12.com> 2268 * src/rcfile.c (parse_include): Plug two tiny memory leaks. 2269 2270 2014-04-26 Benno Schulenberg <bensberg@justemail.net> 2271 * src/global.c (add_to_funcs): Add a pointer to the tail of the 2272 functions list, to simplify and speed up adding new items. And 2273 make use of it to remember the location of the Uncut item. 2274 * src/global.c, src/files.c (make_new_buffer, close_buffer): Make 2275 help lines show "Close" again when more than one buffer is open. 2276 * src/global.c (strtosc), doc/man/nanorc.5: Allow the do_spell 2277 (and thus do_lint) function to be bound to other key combos. 2278 * src/global.c (strtosc), doc/man/nanorc.5: Group related functions 2279 together, remove duplicate up/down, add missing prevpage/nextpage. 2280 2281 2014-04-24 Benno Schulenberg <bensberg@justemail.net> 2282 * doc/faq.html: Update a few URLs, delete some obsolete ones, update 2283 the section on configuration flags and on translating nano, plus a 2284 whole series of other small fixes and adjustments. 2285 2286 2014-04-23 Benno Schulenberg <bensberg@justemail.net> 2287 * src/winio.c, src/help.c, src/text.c, src/browser.c: Remove 2288 several unneeded double semicolons, and two relic comments. 2289 * src/help.c (parse_help_input), src/browser.c (parse_browser_input): 2290 Make the Minus and Space keys work in the help viewer and file browser 2291 also when the PrevPage and NextPage functions are bound to meta-key 2292 sequences -- searching for these will not find them. So, instead put 2293 in the standard key code. This fixes Savannah bug #42140. 2294 * src/global.c (first_sc_for): Stop the whole charade of preferring 2295 control keys over meta keys over function keys, but return the first 2296 one in the list -- just like the function name implies. This will 2297 make a user-defined shortcut appear in the two bottomlines without 2298 having to unbind the existing one first -- better feedback. 2299 * src/global.c (shortcut_init, flagtostr, strtosc): Put the two 2300 wrapping toggles together and increase their contrast a bit. 2301 * src/nano.c (usage), doc/man/nano{.1,rc.5}, doc/texinfo/nano.texi: 2302 Increase the contrast between hard-wrapping and soft-wrapping. 2303 2304 2014-04-22 Benno Schulenberg <bensberg@justemail.net> 2305 * src/global.c (shortcut_init): Put the movement keys in the 2306 help viewer in the order of increasing stride. 2307 * src/global.c (shortcut_init): Rename many constants from 2308 '*_msg' to '*_tag' to reduce confusion with 'nano_*_msg'. 2309 * src/global.c (shortcut_init): Elide several pointless constants. 2310 * src/global.c (shortcut_init): Elide more unneeded constants, and 2311 update some translator comments and shorten a few tags. 2312 * src/global.c (shortcut_init): Delete unneeded empty funcs; being 2313 in the list of shortcuts is enough. 2314 * src/global.c (shortcut_init): Put left/right in normal order. 2315 * src/global.c (shortcut_init): List function key after meta key. 2316 * src/help.c (help_init): Show just two shortcuts per function -- 2317 only three functions showed three, but who has an F13, F14, F15? 2318 This also fixes Savannah bug #41889: misalignment of help text. 2319 * src/help.c (help_init): Split the toggles into three groups, 2320 and do not show toggle keys that have been rebound. 2321 2322 2014-04-21 Benno Schulenberg <bensberg@justemail.net> 2323 * doc/syntax/nanorc.nanorc: There is no F0 key. 2324 * src/global.c (first_sc_for): Adjust two comments -- the help 2325 viewer no longer sorts keys to be control first, meta second. 2326 * src/global.c (first_sc_for): Put meta first, for clarity. 2327 * src/global.c (strtokeytype): No need to check for lowercase 2328 'm' or 'f', the source doesn't use them and rc-file processing 2329 uppercases them. Also put control first, for clarity. 2330 * src/global.c (strtosc, strtomenu): Sort functions slightly 2331 better, and allow things to be rebound in the linter menu. 2332 * src/nano.h: Delete a large bunch of unused defines. 2333 * src/nano.h, src/proto.h: Delete some more unused stuff. 2334 * src/rcfile.c (parse_binding), src/winio.c (get_mouseinput): 2335 Avoid three compiler warnings with --enable-debug. 2336 * src/global.c (assign_keyinfo): Decombine repetitive condition. 2337 * src/global.c (assign_keyinfo, shortcut_init): Give nicer names 2338 to the dedicated keys, for when they show up in the help lines. 2339 * src/rcfile.c (parse_binding): K-keys no longer exist. 2340 * src/global.c, src/rcfile.c, doc/nanorc.sample.in: Allow the 2341 codes from the Ins and Del keys to be rebound. 2342 * src/rcfile.c (parse_binding): Improve two error messages, and 2343 complain about wrong menu names after wrong function names. 2344 2345 2014-04-16 Benno Schulenberg <bensberg@justemail.net> 2346 * src/winio.c (get_mouseinput): Properly find also the zeroeth 2347 item from a certain menu in the list of functions. Until now 2348 this accidentally worked, because "Get Help" was the very first 2349 item in almost all menus. Partly fixes Savannah bug #42093. 2350 * src/nano.h: MHELP should not be part of MALL, as ^B and ^F and 2351 Enter and Backspace and so on don't make any sense there. 2352 * src/nano.h, src/global.c (shortcut_init): Rename MALL to MMOST, 2353 to be more accurate. 2354 * src/nano.h, src/global.c, src/help.c, src/search.c: Rename 2355 MREPLACE2 to MREPLACEWITH, for clarity. 2356 * src/nano.h: Adjust some tabbing and spacing. 2357 * src/global.c (shortcut_init): Make better use of MMOST. 2358 2359 2014-04-15 Benno Schulenberg <bensberg@justemail.net> 2360 * src/nano.c (precalc_multicolorinfo): Actually set the intended 2361 non-blocking mode for keyboard input. 2362 * src/winio.c: Relocate and correct a few comments. 2363 * README.SVN: To build nano from svn, ssh is not required. 2364 * src/*.c: Normalize whitespace around '==' comparison. 2365 * configure.ac: Check for the availability of snprintf(), 2366 fixes Savannah bug #42070 reported by David Lawrence Ramsey. 2367 * src/global.c (shortcut_init), src/help.c (do_help): Add the 2368 shortcuts M-\ and M-/ for First Line and Last Line to the help 2369 viewer, instead of ^Y and ^V, which are already taken for Page 2370 Up and Page Down. Also, stop them from aborting the viewer. 2371 * src/help.c (do_help): Remove superfluous abortion variable. 2372 * src/global.c (shortcut_init), src/help.c (do_help): Add the 2373 shortcut ^L for Refresh to the help viewer and stop it aborting; 2374 a changed version of patch #7013 from David Lawrence Ramsey. 2375 2376 2014-04-14 Benno Schulenberg <bensberg@justemail.net> 2377 * src/{proto.h,cut.c,nano.c,text.c}: Remove the unused parameter 2378 'file_bot' from copy_from_filestruct(), and rename the other. 2379 * src/*: Remove the unused parameter 'func_key' from get_shortcut(), 2380 and subsequently from parse_browser_input() and parse_help_input(). 2381 * src/*: Adjust some whitespace and tweak a few comments. 2382 * src/winio.c (getfuncfromkey): Elide variable and condense comment. 2383 * src/text.c (break_line): Initialize a variable to avoid a compiler 2384 warning, rename it to be more apt, add a comment, tweak some others, 2385 and remove an unneeded 'if'. 2386 * src/char.c (move_mbleft): Avoid a compiler warning (int → size_t), 2387 rename the variable, and another, and straighten out the logic. 2388 2389 2014-04-13 Benno Schulenberg <bensberg@justemail.net> 2390 * proto.h, global.c, rcfile.c: Remove the unused parameter 'menu' 2391 from strtosc(). 2392 * global.c (shortcut_init): Remove mistaken browser item from the 2393 Go-To-Line menu. 2394 * global.c (shortcut_init): Delete a misplaced setting of 'currmenu'. 2395 * global.c (shortcut_init, strtomenu): Cosmetic tweaks. 2396 * doc/syntax/{changelog,c,po}.nanorc: Some small extra colourings. 2397 * configure.ac, doc/texinfo/nano.texi: Make --enable-tiny disable 2398 the use of libmagic, and document the --disable-libmagic flag. 2399 * src/nano.c (version): Print the correct --enable/--disable option. 2400 * configure.ac, src/*, doc/texinfo/nano.texi: Convert all occurrences 2401 of #ifdef ENABLE_NANORC to #ifndef DISABLE_NANORC, and adapt for it. 2402 * configure.ac: Complain about --enable-color without --enable-nanorc. 2403 2404 2014-04-10 Benno Schulenberg <bensberg@justemail.net> 2405 * doc/syntax/Makefile.am: Add four recent syntaxes to the packlist. 2406 2407 2014-04-08 Benno Schulenberg <bensberg@justemail.net> 2408 * doc: Add the documentation for the new --noread option. 2409 * doc: Add missing --poslog option to the texinfo file, plus tweaks. 2410 2411 2014-04-08 Hans Alves <fonsvandeachterburen@gmail.com> 2412 * nano.h, files.c, nano.c: Adding the command-line option --noread 2413 to treat any name on the command line as a new file. This allows 2414 nano to write to named pipes -- it will start with a blank buffer, 2415 and will write to the pipe when the user saves the file. This way 2416 nano can be used as an editor in combination with for instance gpg 2417 without having to write sensitive data to disk first. 2418 2419 2014-04-08 David Lawrence Ramsey <pooka109@gmail.com> 2420 * src/*.c: More editing of comment blocks and trimming of blank lines. 2421 2422 2014-04-08 Benno Schulenberg <bensberg@justemail.net> 2423 * src/rcfile.c: Correct two comments, and tweak two others. 2424 * src/color.c (color_update): Correct one comment, tweak some others, 2425 remove two superfluous ones, and remove an unneeded 'if'. 2426 2427 2014-04-08 David Lawrence Ramsey <pooka109@gmail.com> 2428 * src/nano.c (main): Convert the literal UTF-8 whitespace string into 2429 its corresponding byte sequence, and add a comment for it. 2430 * src/{files.c,global.c,help.c,winio.c}: Reformat some comment blocks, 2431 fix a few typos, and remove a few unneeded blank lines. 2432 2433 2014-04-08 Benno Schulenberg <bensberg@justemail.net> 2434 * src/rcfile.c (parse_binding): Melt the binding and unbinding code, 2435 which are very similar, into a single function. 2436 * src/rcfile.c (parse_binding): Uppercase only the first two or three 2437 characters of the key name, in order to preserve ^Space and M-Space, 2438 so they can be unbound. Fixes Savannah bug #41940. 2439 * doc/syntax/go.nanorc: Extend the syntax highlighting for Go lang, 2440 from the submission by Robert Clausecker <fuzxxl@Savannah>. 2441 2442 2014-04-07 Benno Schulenberg <bensberg@justemail.net> 2443 * src/{proto.h,global.c,text.c}: Keep a pointer to the Uncut item in 2444 the functions list, to be able to change its description to Unjustify 2445 at the appropriate moment. This avoids having to fully repopulate 2446 the functions and shortcuts lists before and after every Justify. 2447 Also, look for ^U only in the main menu, to which ^W M-J factually 2448 returns and which shortcut_init() "sneakily" sets. 2449 * src/{proto.h,files.c,global.c,nano.c,rcfile.c}: Drop the obsolete 2450 argument of shortcut_init(), and remove two unneeded calls of it. 2451 * src/global.c (shortcut_init): Allow M-J after an --enable-justify. 2452 * src/rcfile.c (parse_rcfile): The user documentation only speaks 2453 of options, not of flags. Make the error messages conform. 2454 * src/rcfile.c (check_vitals_mapped): Improve layout of message. 2455 2456 2014-04-06 Benno Schulenberg <bensberg@justemail.net> 2457 * src/global.c (shortcut_init): Limit M-T (cut-till-end-of-file) to 2458 the main menu, and M-J (full-justify) to the main and search menus. 2459 * src/proto.h: There is no need for the helpline tags to be external, 2460 they are only ever used in src/global.c. 2461 * src/global.c: Do not set any helpline tags to empty strings; 2462 compilation should fail if they are needed and not defined. 2463 2464 2014-04-05 Benno Schulenberg <bensberg@justemail.net> 2465 * src/nano.c (version): Print the correct configuration options. 2466 * src/{chars.c,nano.c,text.c}: Cosmetic tweaks. 2467 * doc/texinfo/nano.texi: Adjust for new disabling config options. 2468 2469 2014-04-05 Mike Frysinger <vapier@gentoo.org> 2470 * src/nano.c (do_input): Reload possibly freed function pointer. 2471 2472 2014-04-04 Benno Schulenberg <bensberg@justemail.net> 2473 * src/{files.c,nano.c}: Avoid two more compilation warnings. 2474 * configure.ac: Allow --enable-extra and --enable-multibuffer 2475 to override --enable-tiny. 2476 * src/rcfile.c (check_vitals_mapped): Do not allow 'set quiet' 2477 to suppress a fatal-error message, make sure the user sees it. 2478 * src/color.c: Comment tweaks. 2479 * src/{*.h,*.c}, configure.ac: Convert all occurrences of 2480 #ifdef ENABLE_COLOR to #ifndef DISABLE_COLOR. 2481 * src/nano.h: Comment tweaks. 2482 * configure.ac: Move the enabling stuff to after the disablers. 2483 * configure.ac: Add submissive colour disabling to --enable-tiny. 2484 * configure.ac: Allow other enablers to override --enable-tiny too. 2485 * src/{proto.h,search.c}: Fix compilation with --enable-browser. 2486 * src/global.c (shortcut_init): Fix warnings with --enable-help. 2487 * src/text.c (do_justify): Fix compilation with --enable-justify. 2488 * src/nano.c (do_mouse): Fix warning with --enable-mouse. 2489 * src/prompt.c (get_prompt_string): Fix compilation for the 2490 combination of --enable-tiny with --enable-tabcomp. 2491 * src/prompt.c (get_prompt_string): Normalize the indentation. 2492 * src/text.c: Comment tweaks. 2493 2494 2014-04-03 Benno Schulenberg <bensberg@justemail.net> 2495 * configure.ac: Remove unused '*_support' variables. 2496 * doc/syntax/po.nanorc: New file, syntax colouring for PO files. 2497 * configure.ac: Stop --with-slang from duplicating --enable-tiny. 2498 * configure.ac: Sort all the disabling options alphabetically. 2499 * src/{proto.h,files.c,global.c,nano.c,rcfile.c}, configure.ac: 2500 Convert #ifdef ENABLE_MULTIBUFFER to #ifndef DISABLE_MULTIBUFFER. 2501 * src/{proto.h,files.c,,nano.c,winio.c}, configure.ac: 2502 Convert #ifdef NANO_EXTRA to #ifndef DISABLE_EXTRA. 2503 * src/{global.c,text.c}: Fix two compilation warnings for tiny. 2504 2505 2014-04-02 Benno Schulenberg <bensberg@justemail.net> 2506 * configure.ac, doc/Makefile.am: Try to build the info documentation 2507 only when 'makeinfo' is available. Patch partly by Mike Frysinger. 2508 * configure.ac: Upping the required version of Autoconf, to ensure the 2509 ONCE macros are defined. Suggested by Kamil Dudka and Mike Frysinger. 2510 2511 2014-04-02 Mike Frysinger <vapier@gentoo.org> 2512 * doc/man/{,fr}/Makefile.am: Simplify the man rules still further. 2513 * .gitignore: Add 'config.cache', created by './configure -C'. 2514 * src/nano.c (die_save_file): Newer gcc warns about set-but-unused 2515 variables, so add a dummy if() check to kill that off. 2516 * src/search.c (search_init): Silence a compiler warning about a 2517 variable possibly being used uninitialized. 2518 2519 2014-03-31 Chris Allegretta <chrisa@asty.org> 2520 * doc/syntax/go.nanorc: New file, basic go syntax highlighting. 2521 2522 2014-03-30 Benno Schulenberg <bensberg@justemail.net> 2523 * doc/syntax/changelog.nanorc: New file, first attempt at colouring 2524 Changelog files. 2525 * ChangeLog: Consistently use a colon after names of changed files. 2526 2527 2014-03-30 Mike Frysinger <vapier@gentoo.org> 2528 * doc/Makefile.am, doc/man/Makefile.am, doc/man/fr/Makefile.am: 2529 The build already provides a standard htmldir for installing html 2530 files. Use that instead of creating our own. 2531 * doc/man/Makefile.am, doc/man/fr/Makefile.am: Use dist_ prefixes 2532 and += appending supported by automake to produce simpler files. 2533 * doc/Makefile.am: Drop redundant localedir, as autoconf/automake 2534 already creates this for us. 2535 * src/rcfile.c, doc/nanorc.sample.in: Hard-listing all the wanted 2536 syntax files is a PITA. Support globs in include paths, so people 2537 can easily drop in new files and have it "just work". 2538 2539 2014-03-27 Benno Schulenberg <bensberg@justemail.net> 2540 * src/nano.c (main): Fix compilation with --disable-utf8. 2541 * src/global.c (shortcut_init): Place a help string among 2542 its kin, adjust some indentation, group function pairs more 2543 tightly, bundle restricted stuff, and delete an unused item. 2544 2545 2014-03-27 Mike Frysinger <vapier@gentoo.org> 2546 * configure.ac: Make --disable-nanorc with --enable-color barf. 2547 * configure.ac: Allow --disable-utf8 and --enable-utf8 to work. 2548 2549 2014-03-26 Benno Schulenberg <bensberg@justemail.net> 2550 * configure.ac: Word, tab, and comment tweaks. 2551 * src/global.c: Some comment tweaks, and whitespace trimmings. 2552 * src/global.c (print_sclist): Also print last shortcut in list. 2553 * doc/texinfo/nano.texi: Explain how to select and paste with 2554 the mouse when mouse support is enabled: by holding down Shift. 2555 * nano.spec.in, doc/faq.html, doc/texinfo/nano.texi: Remove 2556 vestiges of the obsolete '--enable-all' configure flag. 2557 * src/rcfile.c: Fix compilation with --disable-color. 2558 * src/rcfile.c: Allow (un)binding keys when colour is disabled. 2559 * src/help.c: Fix compilation with --disable-browser. 2560 * src/{proto.h,browser.c,help.c}: Remove a superfluous function. 2561 2562 2014-03-26 Mike Frysinger <vapier@gentoo.org> 2563 * configure.ac: Clean up most of the --with/--enable flags: 2564 - use AS_HELP_STRING instead of writing the text ourselves; 2565 - use the normal enable_xxx var AC_ARG_ENABLE creates for us; 2566 - delete duplicate checks in a few places (due to previous cleanup); 2567 - unwrap some macros/var assignments; 2568 - delete trailing whitespace; 2569 - delete old --enable-all flag; 2570 - fix quoting on a lot of vars that come from the user; 2571 - use AC_MSG_* helpers instead of raw `echo`. 2572 2573 2014-03-24 Benno Schulenberg <bensberg@justemail.net> 2574 * src/{nano,move,winio}.c: Fix a few compiler warnings. 2575 * src/{global,rcfile,winio}.c: Print menu numbers for debugging 2576 in hex, and tweak a few of those debugging messages. 2577 * src/nano.c: Harmonize comments, and trim some blank lines. 2578 2579 2014-03-24 Mike Frysinger <vapier@gentoo.org> 2580 * doc/syntax/gentoo.nanorc: Match more files, add a trailing 2581 whitespace check, and EAPI=5 updates. 2582 * doc/syntax/javascript.nanorc: New file, based on C syntax. 2583 * doc/syntax/{nanorc,python}.nanorc: Highlight trailing whitespace. 2584 * configure.ac, m4/ax_check_compile_flag.m4: Start building with 2585 warnings enabled, to help prevent issues from silently creeping in. 2586 * configure.ac: Newer ncurses include pkg-config files which tell 2587 us the right -I/-L paths we need, so default to that before trying 2588 the legacy ways. 2589 * configure.ac: Add a configure flag to disable the use of the 2590 fattening libmagic. 2591 2592 2014-03-23 Benno Schulenberg <bensberg@justemail.net> 2593 * src/rcfile.c (parse_keybinding, parse_unbinding): Improve a 2594 debugging message, fix a translator comment, and tweak others. 2595 2596 2014-03-22 Benno Schulenberg <bensberg@justemail.net> 2597 * THANKS: Add some missing translator names, and tweak others. 2598 2599 2014-03-21 Benno Schulenberg <bensberg@justemail.net> 2600 * src/chars.c (is_punct_mbchar, mbstrchr): Elide a variable, 2601 thus making two ifs identical to six others. 2602 * doc/syntax/nanorc.nanorc: Add the 'extendsyntax' directive, 2603 and change two colours to be legible on a light background. 2604 2605 2014-03-19 Benno Schulenberg <bensberg@justemail.net> 2606 * doc/nanorc.sample.in: Document the changed whitespace defaults. 2607 * src/global.c, doc/man/nanorc.5: Allow softwrap to be rebound. 2608 * doc/nanorc.sample.in: Sort the includes alphabetically, and 2609 add the ones for Lua, Magicpoint, and Spec files. 2610 * doc/nanorc.sample.in: Add "poslog", plus tiny textual tweaks. 2611 * src/global.c, doc/man/nanorc.5: Group softwrap with the toggles 2612 that affect how things look -- it does not belong in the group of 2613 general program functions, nor in the group of editing behaviour. 2614 * doc/man/nanorc.5: Add the descriptions of six missing bindable 2615 functions, and tweak those of a few others. 2616 2617 2014-03-18 Benno Schulenberg <bensberg@justemail.net> 2618 * src/global.c (shortcut_init): In the file browser one cannot 2619 search for a regular expression, so do not mention it. 2620 2621 2014-03-17 Benno Schulenberg <bensberg@justemail.net> 2622 * src/global.c (shortcut_init): Show ^F and ^B instead of kright 2623 and kleft in the help lines of the tiny version. 2624 * src/global.c (shortcut_init): Remove some inconsistent spaces 2625 and newlines, condense three statements into one, place an #endif 2626 better, melt two #ifndefs into one, and add a comment. 2627 * src/winio.c (edit_scroll): Remove the old softwrap scrolling code. 2628 * src/{nano.h,proto.h,color.c,cut.c,files.c,global.c,help.c,nano.c, 2629 search.c,text.c,utils.c}: Add, fix, and remove some #endif comments, 2630 remove an obsolete comment, and remove some superfluous #ifndefs. 2631 * src/global.c (shortcut_init): Put ^B and ^F in the same order as 2632 all other command keys: first the backward then the forward motion. 2633 * src/{nano.h,*.c}: Remove stray spaces before tabs. 2634 2635 2014-03-16 Benno Schulenberg <bensberg@justemail.net> 2636 * src/nano.h: Display more help items when the terminal is wider. 2637 2638 2014-03-14 Benno Schulenberg <bensberg@justemail.net> 2639 * src/nano.c (main): When in a UTF-8 locale, use prettier characters 2640 (»·) for indicating whitespace, and for similarity use ">." instead of 2641 ":." when not in a UTF-8 locale. Changes suggested by Mike Frysinger. 2642 2643 2014-03-05 Benno Schulenberg <bensberg@justemail.net> 2644 * src/move.c (do_down): Initialize the correct variable to zero. 2645 Solves jumpy scrolling behaviour reported by Chris Allegretta. 2646 2647 2014-03-04 Chris Allegretta <chrisa@asty.org> 2648 * global.c (first_sc_for): Return raw keystrokes last, so 2649 they will not be displayed if there are F-keys or Meta keys 2650 mapped for an item in the shortcut list. 2651 2652 2014-03-04 Benno Schulenberg <bensberg@justemail.net> 2653 * doc/syntax/nanorc.nanorc: Add keyword 'quiet', sort 'locking', 2654 and concatenate the two separate strings into one. 2655 * src/nano.c (main), doc/nanorc.sample.in: Make the M-P toggle 2656 actually do something by default, by using visible characters. 2657 * src/global.c (shortcut_init): Normalize the writing of three 2658 help-line items: "Write Out", "Uncut Text", and "Unjustify", to 2659 better stress the O and U -- the big C and J were distracting. 2660 * doc/{syntax/nanorc.nanorc,man/nanorc.5,texinfo/nano.texi}: 2661 Remove erroneous 'suspendenable' -- it is not a settable option 2662 but a bindable function. 2663 2664 2014-03-03 Chris Allegretta <chrisa@asty.org> 2665 * global.c (shortcut_init): Don't actually free the shortcut 2666 list, since the next pass via justifying will then remove all 2667 custom shortcuts. Fixes bug discovered by Benno Schulenberg. 2668 * text.c (do_linter): Remove some unused variables to quiet 2669 -pedantic -Wall. 2670 2671 2014-03-03 Benno Schulenberg <bensberg@justemail.net> 2672 * src/global.c (add_to_funcs): Add a newline, for clarity. 2673 * src/global.c (shortcut_init): Mark, don't translate yet. 2674 * src/move.c (do_down): Correctly compute the minimum amount 2675 to scroll when softwrap is on and there are overlong lines. 2676 * src/winio.c (edit_scroll): Disable amount computation here. 2677 * src/move.c (do_down): Trim some redundant code, and correct 2678 the scrolling behaviour when softwrap is off -- the construct 2679 (amount ? amount : 1) wasn't doing what I intended. 2680 * doc/man/nano{.1,rc.5}: Slightly improve formatting and wording. 2681 * doc/{texinfo/nano.texi,man/nanorc.5}: Add some missing options 2682 to the texinfo documentation, and improve alphabetization a bit. 2683 * src/nano.c (usage): Don't mention --softwrap in tiny version. 2684 2685 2014-03-01 Chris Allegretta <chrisa@asty.org> 2686 * global.c (shortcut_init): Fix an issue with the split 2687 do_research() setup when using --enable-tiny. 2688 * rcfile.c (parse_linter): Allow linter to be unset using "". 2689 * rcfile.c: Allow syntaxes to be extended via "extendsyntax" 2690 directive. Color, header, magic and linter should all be 2691 able to be extended. Man page updates for nanorc(5). 2692 * doc/nanorc.sample.in: Document 'set quiet'. 2693 2694 2014-03-01 Mike Frysinger <vapier@gentoo.org> 2695 * src/color.c (color_update): Do not write to stderr on magic 2696 errors. If the magic db has errors such that magic_load() fails, 2697 the current code dumps to stderr which messes up the terminal. 2698 The error message is also vague to the point where it's confusing 2699 -- I thought nano had problems writing to the file I was editing. 2700 Instead, use statusbar() and clarify the messages. 2701 (Patch tweaked by Benno.) 2702 2703 2014-02-28 Benno Schulenberg <bensberg@justemail.net> 2704 * src/text.c (execute_command): Equalize pipe error messages. 2705 * src/global.c (thanks_for_all_the_fish): Remove a redundant 2706 '#ifdef DEBUG', it is contained within a wider one. 2707 * src/global.c (strtosc): Correct a misspelled keyword. 2708 * src/rcfile.c (check_vitals_mapped): Actually translate a 2709 helpful message, and reword it somewhat for clarity. 2710 * src/global.c: Remove unused function 'free_shortcutage'. 2711 * src/global.c (strtosc): Indent conditions consistently. 2712 2713 2014-02-28 Eitan Adler <lists@eitanadler.com> 2714 * src/nano.c (do_toggle): Constify a char pointer, to fix 2715 a warning when compiling with clang (and -Wall). 2716 2717 2014-02-27 Mike Frysinger <vapier@gentoo.org> 2718 * doc/man/nanorc.5: Relocate the misplaced unbind section, 2719 and improve formatting. (Patch tweaked by Benno.) 2720 * doc/syntax/nanorc.nanorc: Add the bind/unbind commands, 2721 so they will look supported when using syntax highlighting. 2722 2723 2014-02-27 Benno Schulenberg <bensberg@justemail.net> 2724 * src/help.c (parse_help_input): Make 'Space' again an alias 2725 for PageDown and 'Minus' for PageUp -- they were mistakenly 2726 swapped during code conversion in r4223. 2727 2728 2014-02-26 Mike Frysinger <vapier@gentoo.org> 2729 * doc/syntax/sh.nanorc: Highlight more shell builtins and 2730 common commands, and rewrite the variable highlighting to be 2731 more exact and handle cases where string operations are used. 2732 * doc/syntax/gentoo.nanorc: Update to newer EAPIs, and fold 2733 in updated shell changes too. Much of this is based on work 2734 by Davide Pesavento <pesa@gentoo.org>. 2735 * doc/syntax/makefile.nanorc: Highlight trailing whitespace. 2736 2737 2014-02-26 Benno Schulenberg <bensberg@justemail.net> 2738 * src/global.c (shortcut_init): Put PageUp and PageDown 2739 and also WhereIs and WhereIsNext together in the help lines 2740 of the file browser, and WriteOut and Readfile in the help 2741 lines of the main window -- related stuff in one column. 2742 * doc/syntax/man.nanorc: Better colouring of manpage files. 2743 2744 2014-02-26 Konstantin Abakumov <abakumov@Savannah> (tiny change) 2745 * doc/syntax/python.nanorc: Slightly improve the regexes for 2746 multiline strings in Python, reducing spillage. 2747 2748 2014-02-26 Benno Schulenberg <bensberg@justemail.net> 2749 * src/move.c (do_down), src/winio.c (edit_scroll): Scroll an 2750 extra amount when softwrap is on and the current line would 2751 otherwise run off the screen, and recalculate maxrows after 2752 each scroll. Solves bug #27550 reported by Hannes Schueller. 2753 2754 2014-02-25 Benno Schulenberg <bensberg@justemail.net> 2755 * NEWS: Fix some typos and wordings, and rewrap a few lines. 2756 * src/global.c: Correcting some translator comments, removal 2757 of a few superfluous blank lines, and some pedantic comment 2758 tweaks (mainly adding missing periods and stars). 2759 * src/global.c: Ordering "Prev Word" and "Next Word" better. 2760 * src/global.c: Make ^G not only call help but also exit from 2761 it, and make ^C also exit from help and from the file browser. 2762 Also remove two redundant shortcut definitions. 2763 2764 2014-02-25 Mike Frysinger <vapier@gentoo.org> 2765 * src/Makefile.am: Rename 'INCLUDES' to 'AM_CPPFLAGS', since 2766 Automake changed the naming of these a while ago, and at least 2767 version 1.13 now starts warning about it. 2768 * .gitignore: Ignore generated files (and bak files). 2769 2770 2014-02-25 Benno Schulenberg <bensberg@justemail.net> 2771 * src/files.c (write_lockfile, do_lockfile): Fix a typo reported 2772 by Jean-Philippe Guérard and inconsistent spelling of "lock file" 2773 reported by myself on nano-devel in March 2013. 2774 2775 2014-02-25 Benno Schulenberg <bensberg@justemail.net> 2776 * src/help.c (do_help_void): Call the help browser with the correct 2777 refresher for afterwards. This solves a bug reported by myself on 2778 nano-devel in August 2010: after typing ^R ^T ^W ^G ^X, the file 2779 being edited would get displayed instead of the list of files. 2780 2781 2014-02-24 Chris Allegretta <chrisa@asty.org> 2782 * New linter functionality, rcfile option "linter". 2783 * src/global.c (shortcut_init): Actually free the sclist 2784 if it was allocated before. 2785 * src/winio.c (do_credits): Add Benno, my children, 2786 update copyright info. 2787 2788 2014-02-23 Benno Schulenberg <bensberg@justemail.net> 2789 * doc/syntax/*.nanorc: Comment and punctuation tweaks. 2790 * doc/syntax/sh.nanorc: Colour $VAR within a "" string 2791 but not within a '' string, and do not colour strings 2792 within comments. Fixes bug #29943. 2793 2794 2014-02-23 Benno Schulenberg <bensberg@justemail.net> 2795 * src/text.c (do_undo, do_redo, add_undo): Make warning 2796 sentences in the status bar consistently end in a period. 2797 2798 2014-02-22 Benno Schulenberg <bensberg@justemail.net> 2799 * src/files.c (write_file): Add a missing malloc. 2800 Reported by an anonymous cross compiler, bug #30671. 2801 2802 2014-02-22 Benno Schulenberg <bensberg@justemail.net> 2803 * src/winio.c (get_mouseinput): Correct an oversight, 2804 use the proper 'do_up_void' and 'do_down_void' names. 2805 Reported by Zhou Z.J. <zzj666@Savannah>, bug #38268. 2806 2807 2014-02-22 Lauri Kasanen <laxy@Savannah> (tiny change) 2808 * doc/syntax/html.nanorc: Also recognize htm as extension, 2809 use cyan for tags (more visible on dark background), correct 2810 the expression for ampersand codes, and colour strings too. 2811 2812 2014-02-22 Dennis Jenkins <dennisjenkins@Savannah> (tiny change) 2813 * doc/syntax/c.nanorc: Also recognize c++ as extension. 2814 2815 2014-02-22 Benno Schulenberg <bensberg@justemail.net> 2816 * src/nano.c (move_to_filestruct): Update the data in 'mark_begin' 2817 when mark and cursor are on the same line. This avoids a segfault 2818 after M-A, right, M-T, left, ^K, or a hang when the left is left out. 2819 2820 2014-02-22 Benno Schulenberg <bensberg@justemail.net> 2821 * src/nano.c (main): Add two conditions on ENABLE_NANORC. 2822 * src/files.c (close_buffer, do_insertfile): Likewise. 2823 This avoids compilation failure when nano is configured 2824 with both --disable-color and --disable-nanorc. 2825 2826 2014-02-22 Felipe Bugno <capent@Savannah> (tiny change) 2827 * doc/nanorc.sample.in: Add an include for CMake files. 2828 2829 2014-02-22 David Lawrence Ramsey <pooka109@gmail.com> 2830 * src/nano.c (allow_pending_sigwinch): A (char *) cast for pedantic purposes. 2831 * src/cut.c (do_cut_text): Wrap a reference to 'copy_text' in NANO_TINY. 2832 2833 2014-02-22 David Lawrence Ramsey <pooka109@gmail.com> 2834 * ChangeLog, NEWS, doc/faq.html: Fix typos, wording, and spacing. 2835 2836 2014-01-25 Chris Allegretta <chrisa@asty.org> 2837 * src/winio.c (set_modified): Check for a filename before trying to lock. 2838 2839 2014-01-24 Benno Schulenberg <bensberg@justemail.net> 2840 * src/nano.c (copy_from_filestruct): Refresh the mark's pointer when 2841 stuff was pasted into the line where the mark is. This applies 2842 Savannah patch #8180 and fixes the segfault reported on the list: 2843 https://lists.gnu.org/archive/html/nano-devel/2012-07/msg00000.html. 2844 2845 2014-01-01 Chris Allegretta <chrisa@asty.org> 2846 * doc/texinfo/nano.texi: Change '@sp4' since makeinfo 5.1 hates the 2847 lack of spacing. Fixes bug #40103 reported by flapane@Savannah. 2848 Also change SVN status to non-binary so diffs work. 2849 2850 2014-01-01 Chris Allegretta <chrisa@asty.org> 2851 * src/global.c (strtokeytype): Check for lower-case 'f' for defining F-key 2852 sequences for consistency (previously was two checks for upper case 'F'). 2853 Fixes bug #40815 reported by David Binderman <dcb314@Savannah>. 2854 2855 2013-06-13 Matthew Fischer <mfisch@Savannah> 2856 * doc/syntax/c.nanorc: Add the 'auto' keyword. 2857 2858 2013-06-13 David Lawrence Ramsey <pooka109@gmail.com> 2859 * src/global.c (first_sc_for): Try to more consistently display keystrokes, 2860 useful when the user has rebound a bunch of them. 2861 2862 2013-06-13 Kamil Dudka <kdudka@redhat.com> 2863 * doc/man/nano.1: Actually document the -P (--poslog) option. 2864 2865 2013-04-12 Chris Allegretta <chrisa@asty.org> 2866 * src/files.c (do_insertfile): Check for saved cursor position when inserting a 2867 file as well. Fixes Savannah bug #38600 reported by Craig Barnes. 2868 * src/files.c (write_file): Don't re-stat() the file if we're writing out 2869 a marked portion (especially because it would give the wrong stat info). 2870 Part two of issue reported by Benno Schulenberg. 2871 2872 2013-04-07 Michael Berg <mike@berg-net.us> 2873 * do_cut_text: Fix copying (not cutting) text setting Modified state. 2874 Partly fixes an issue reported by Benno Schulenberg. 2875 2876 GNU nano 2.3.2 - 2013.03.23 2877 2878 2013-03-17 Chris Allegretta <chrisa@asty.org> 2879 * Revert r4547 as we should have a new release and the overlap code is not yet 2880 ready for public consumption. 2881 2882 2013-01-20 Chris Allegretta <chrisa@asty.org> 2883 * src/text.c (do_histify): Don't allow sigwinch to be received while justifying 2884 as that puts us into a wacky state. Fixes crash on justify by Joshua Rogers. 2885 * configure.ac: Added --with-wordbounds option to let cross compilers force 2886 whether their target system support GNU-style word boundaries or not. 2887 Originally reported by Dave Festing. 2888 * doc/man/nanorc.5: Fix typo in softwrap description, reported by 2889 cbart387@Savannah. 2890 2891 2013-01-19 Chris Allegretta <chrisa@asty.org> 2892 * configure.ac: Make ncurses checking to set $LIBS and check the ncursesw lib 2893 actually works before defaulting to it over ncurses! Shock! 2894 2895 2013-01-13 Chris Allegretta <chrisa@asty.org> 2896 * src/utils.c (parse_num): Initialize errno before calling strtol(). Fixes issue 2897 where trying to go to a line number too long will break legitimate goto-lines 2898 for the remainder of the editing session, reported by Joshua Rogers. 2899 2900 2013-01-09 Mike Frysinger <vapier@gentoo.org> 2901 * configure.ac: Check for ncursesw5-config and base $CPPFLAGS on it. 2902 2903 2013-01-09 Fabian Groffen <grobian@Savannah> 2904 * configure.ac, src/nano.h: Make the search for ncursesw more generalized. 2905 2906 2013-01-02 David Benjamin <davidben@Savannah> 2907 * src/search.c (parse_syntax): Fix blatantly and dangerously incorrect code 2908 for deleting old syntaxes. 2909 2910 2013-01-02 Mike Frysinger <vapier@gentoo.org> 2911 * src/files.c (cwd_tab_completion): Remove unnecessary variables. 2912 * src/search.c (search_init): Fix gcc complaints on certain versions. 2913 2914 2013-01-02 Eitan Adler <lists@eitanadler.com> 2915 * configure.ac: Remove unnecessary checks. 2916 * src/nano.h, NEWS: Fix redundant wording. 2917 2918 2012-12-31 Chris Allegretta <chrisa@asty.org> 2919 * src/*: Introduce (basic) vim-style file locks. Does not allow vim to recover 2920 our changes, and just lets a vim user know we're editing a file. Command-line 2921 option "-G" or "--locking", nanorc option "locking". New functions in 2922 src/files.c: do_lockfile(), write_lockfile(), and delete_lockfile(). 2923 2924 2012-02-05 Chris Allegretta <chrisa@asty.org> 2925 * src/*: Fix overlapping strings highlighting each other. New variables in edit_draw 2926 (slmatcharray, pbegin, paintok), new logic (with repeated setting of values in the 2927 array but it's BFI after all). FIXME: Need to create a new 'overlap'. 2928 * src/*: Fix a silly issue with the argument to nregcomp, as it's confusing to the caller. 2929 * src/nano.h: Change the color types to a compiler macro (COLORWIDTH), may not actually 2930 even be worth doing, but someday who knows how wide a color curses implementation might 2931 be, and maybe we'll even start checking for it in autoconf! 2932 2933 GNU nano 2.3.1 - 2011.05.10 2934 2935 2011-05-10 Chris Allegretta <chrisa@asty.org> 2936 * text.c (do_enter): Only increment totsize by the auto-indented amount, since the previous 2937 line's size was already counted. Fixes bug reported by Robert Spanjaard. 2938 2939 2011-05-08 Chris Allegretta <chrisa@asty.org> 2940 * doc/syntax/Makefile.am: Finally get around to sorting the syntax file list. 2941 2942 2011-05-08 Matthew Wild <mattj100@Savannah> 2943 * doc/syntax/spec.nanorc: New lua syntax highlighting config. 2944 2945 2011-03-28 Asterios Dramis <asterios.dramis@gmail.com> 2946 * doc/syntax/spec.nanorc: New RPM spec file highlighting config. 2947 2948 2011-03-12 Chris Allegretta <chrisa@asty.org> 2949 * po/*: Sync latest translation fixes, add an update_linguas.sh script. Rename 2950 existing update.pl to update_sources.pl to make it more specific. 2951 2952 2011-03-04 Chris Allegretta <chrisa@asty.org> 2953 * color.c (color_update): Add check for whether the file even exists 2954 before we try to run the magic check on it. Fixes error messages to stderr 2955 when reading in files that don't exist, reported by Mike Frysinger. 2956 2957 2011-03-03 Chris Allegretta <chrisa@asty.org> 2958 * color.c (color_update): Remove unneeded debugging message from libmagic commit. 2959 Fixed extra messages going to stderr, reported by Mike Frysinger. 2960 2961 GNU nano 2.3.0 - 2011.02.26 2962 2963 2011-02-26 Chris Allegretta <chrisa@asty.org> 2964 * Change RAW in function_type enum to RAWINPUT, to fix compilation on AIX, 2965 reported by Richard G Daniel <skunk@iskunk.org>. 2966 2967 2011-02-23 Chris Allegretta <chrisa@asty.org> 2968 * Fix some more severe warnings from 'g++ -pedantic', from patch originally 2969 by Eitan Adler <lists@eitanadler.com>. 2970 2971 2011-02-23 Kamil Dudka <kdudka@redhat.com> 2972 * doc/man/nanorc.5: Fix small typo. Report and original patch by John Bradshaw. 2973 2974 2011-02-22 Chris Allegretta <chrisa@asty.org> 2975 * color.c (nfreeregex): Fix that we were trying to set the pointer passed by value 2976 to NULL. Fixes crashes on file save reported by Ken Tyler and Matthieu Lejeune. 2977 2978 2011-02-18 Chris Allegretta <chrisa@asty.org> 2979 * New saved cursor position history option. Command line option -P or --poslog, rc file 2980 entry "poslog". Search history changes to ~/.nano/search_history, cursor position log 2981 is ~/.nano/filepos_history. Added checks to move the legacy .nano_history file to the 2982 new location. Several new functions to files.c: load_poshistory(), save_poshistory(), 2983 check_poshistory(), update_poshistory(), and reworking of histfilename(). New FAQ entry 2984 4.15 discussing the change and offering an interoperability workaround. 2985 * files.c (load_history): Set last_search to the last search value we loaded from history, 2986 so do_research will succeed without needing to manually load the last search in. Fixes 2987 bug reported by Matthieu Lejeune. 2988 2989 2011-02-12 Chris Allegretta <chrisa@asty.org> 2990 * Initial libmagic implementation, adapted from Eitan Adler <eitanadlerlist@gmail.com>. 2991 New nanorc entry "magic" to enable this functionality, nanorc file and man page updates. 2992 2993 2011-02-06 Chris Allegretta <chrisa@asty.org> 2994 * src/*: Retire iso_me_harder_funcmap based on suggestion by <bernd.spaeth@gmx.net>. 2995 This does add 20KB to nano's executable size but it gets rid of a lot of indirection 2996 that makes people's stomach turn. There are several new stub functions and a need of 2997 more tidying as a result of this. 2998 * files.c (write_file): Fix problems with writing the backup file (albeit interactively) 2999 with new function prompt_failed_backupwrite(), allows more secure handling of problems 3000 with failing to write the backup file compared to 'allow_insecure_backup'. 3001 * winio.c (edit_redraw): Remove unused variable. 3002 3003 GNU nano 2.2.6 - 2010.11.22 3004 3005 2010-11-15 Chris Allegretta <chrisa@asty.org> 3006 * Add a section to the FAQ about using nanorc on Win32 systems. 3007 3008 2010-11-12 Chris Allegretta <chrisa@asty.org> 3009 * Add check for RESTRICTED mode back to speller, suspend and insert file routines, 3010 since adding key bindings broke the fact that they should be disabled in restricted\ 3011 mode. Fixes Savannah bug #31625 reported by Charlie Somerville. 3012 3013 GNU nano 2.2.5 - 2010.08.05 3014 3015 2010-08-04 Lauri Kasanen <curaga@operamail.com> 3016 * doc/syntax/mgp.nanorc: New Magicpoint syntax highlighting definition. 3017 3018 2010-08-04 Peter <exodus@savannah> 3019 * doc/syntax/tex.nanorc: No longer highlight escaped comments 3020 3021 2010-06-20 Chris Allegretta <chrisa@asty.org> 3022 * New rc file option allow_insecure_backup, allows the previous security 3023 fixes for backup files to be overridden if you're really positive 3024 you want to. Fixes Savannah bug #29732 by Brian Szymanski <skibrianski>. 3025 3026 2010-05-23 Chris Allegretta <chrisa@asty.org> 3027 * files.c (write_file): Don't even try to chown() the backup 3028 file unless we're root, since it's probably going to fail if 3029 we're editing a file we don't own. Fixes Savannah bug 3030 #29514: [nano 2.2.2] backup should ignore chown errors. 3031 3032 GNU nano 2.2.4 - 2010.04.15 3033 3034 2010-04-14 Chris Allegretta <chrisa@asty.org> 3035 * doc/man/nano.1,nanorc.5: Remove the backup file warnings now 3036 that a sufficient security fix exists for the backup file code. 3037 3038 2010-04-14 Chris Allegretta <chrisa@asty.org> 3039 * text.c (do_alt_speller): Skip invoking the alt speller if the file size 3040 is 0 bytes. Fixes Savannah bug #29393 reported by Mike Frysinger. 3041 * files.c (write_file): Don't set current_stat when tmp == TRUE, check 3042 whether current_stat is set when trying to use it, and don't do the 3043 modification check if the filename changed, since we have no way 3044 of knowing about it in that case. Fixes Savannah bug #29392, reported 3045 by Mike Frysinger. [CVE-2010-1160] 3046 3047 2010-04-13 Felipe Bugno <necron@bol.com.br> 3048 * doc/syntax/cmake.nanorc: Added cmake syntax highlighting file. 3049 3050 2010-04-09 Chris Allegretta <chrisa@asty.org> 3051 * files.c (do_writeout): Better security fixes for backup file writing, 3052 mangled from submission by Dan Rosenberg <dan.j.rosenberg at gmail>. 3053 [CVE-2010-1161] 3054 3055 2010-04-08 Chris Allegretta <chrisa@asty.org> 3056 * files.c (do_writeout): Previous fixes should not cause a crash 3057 when saving a new file. Discovered by Mike Frysinger <vapier@gentoo.org>. 3058 3059 2010-04-07 Chris Allegretta <chrisa@asty.org> 3060 * doc/man/nano.1,nanorc.5: Add warnings about using backup 3061 mode as root due to the Dan Rosenberg security analysis. 3062 3063 2010-04-02 Chris Allegretta <chrisa@asty.org> 3064 * files.c (do_writeout): Expand modification check to include both the 3065 original file's device ID and inode number as reasons to warn the 3066 user that the file has been modified. Also abort on writing a backup 3067 file when its owner doesn't match the edited file. Based on security 3068 analysis on nano by Dan Rosenberg. [CVE-2010-1160] 3069 3070 2010-03-21 Chris Allegretta <chrisa@asty.org> 3071 * nano.c (page_stdin et al): Don't attempt to reset/reopen the terminal 3072 settings when reading stdin if it was aborted with SIGINT. May fix 3073 Savannah bug #29114 reported by Mike Frysinger. 3074 3075 2010-03-21 Mike Frysinger <vapier@gentoo.org> 3076 * doc/syntax/c.nanorc: Add additional support for #include_next and #pragma. 3077 3078 2010-03-21 Chris Allegretta <chrisa@asty.org> 3079 * move.c (do_page_up, do_page_down()): Explicitly set current_y to 0 when 3080 paging up when not in smooth scroll mode, as previous fixes would otherwise 3081 cause the cursor to not really be moved to the top of the screen. 3082 3083 2010-03-07 Chris Allegretta <chrisa@asty.org> 3084 * configure.ac, nano.c (handle_sigwinch): Create check for whether LINES and 3085 COLS can safely be redefined. Fixes compilation issues with Cygwin, and likely 3086 with newer versions of ncurses. Fixes Savannah bug #28984 reported by Andy Koppe 3087 and by Eric Oliver via mailing list. 3088 * winio.c (get_mouseinput): Fix stray semicolon in code, also reported in 3089 bug #28984. 3090 3091 GNU nano 2.2.3 - 2010.02.11 3092 3093 2010-01-28 Chris Allegretta <chrisa@asty.org> 3094 * move.c (do_page_up, do_page_down): Fix for smooth mode not preserving cursor 3095 position. Part one of fix for Savannah bug #21178 by Mike Frysinger. 3096 3097 GNU nano 2.2.2 - 2010.01.17 3098 3099 2010-01-17 Chris Allegretta <chrisa@asty.org> 3100 * nano.c (main), prompt.c (do_statusbar_input): Handle problems with an unmapped 3101 function due to key rebinding, fixes crashes on FreeBSD reported by Eitan 3102 Adler <eitanadlerlist@gmail.com>. 3103 3104 2010-01-14 Chris Allegretta <chrisa@asty.org> 3105 * files.c (do_writeout): Fix for crash / incorrect external modification warning 3106 due to earlier fix in r4467. 3107 3108 2010-01-12 Chris Allegretta <chrisa@asty.org> 3109 * move.c (do_page_up, do_page_down): Fix issues with not enough scrolling down/up 3110 and cursor centering. 3111 * winio.c (edit_scroll): Remove lots of needless checking of line length for 3112 soft wrapping code. 3113 * winio.c (edit_update): Remove extra code for when updating with old_current outside 3114 of the new buffer boundary and centering issues. 3115 3116 2010-01-05 Tito <farmatito@tiscali.it> 3117 * search.c (update_history): Fix bad length check causing search crash on armel platform. 3118 3119 2010-01-04 Chris Allegretta <chrisa@asty.org> 3120 * winio.c: edit_update, edit_redraw: Fix search not scrolling to the middle of the screen 3121 (reported by alpha@qzx.com) and places where we rely on maxrows but should not. 3122 3123 2009-12-26 Jordi Mallach <jordi@gnu.org> 3124 * doc/man/nano.1: Avoid a groff warning by prepending a zero-width 3125 space to a line starting with '. 3126 3127 2009-12-22 Chris Allegretta <chrisa@asty.org> 3128 * files.c (write_file): Fix compatibility with previous stat fix and tiny mode. 3129 3130 2009-12-22 David Lawrence Ramsey <pooka109@gmail.com> 3131 * global.c: Add new strings for forward/back in the file browser. New variables 3132 nano_forwardfile_msg and nano_backfile_msg. 3133 3134 2009-12-20 Chris Allegretta <chrisa@asty.org> 3135 * files.c (is_file_writable): remove assert check for f, since it's not 3136 initialized at the time. Fixes Savannah bug #28309, reported by Zoltan Kovacs. 3137 3138 2009-12-20 Brian Szymanski <skibrianski via Savannah> 3139 * src/files.c (write_file): Check whether stat struct exists, and if not, use the 3140 just obtained stat data. Fixes Ubuntu bug 471568, "reproducible crash in nano on 3141 trying to save to a file different than the one specified on the command line". 3142 3143 2009-12-15 Chris Allegretta <chrisa@asty.org> 3144 * doc/nanorc.sample.in: Remove erroneous 'set suspendenable' as it's actually a 3145 key binding (e.g. 'bind M-Z suspendenable all') and not a settable flag. Fixes 3146 Savannah bug #28299 reported by Mike Frysinger. 3147 3148 GNU nano 2.2.1 - 2009.12.12 3149 3150 2009-12-12 Chris Allegretta <chrisa@asty.org> 3151 * text.c (do_delete), nano.c (do_output): Add check for length of current line 3152 before and after adding/deleting text, and do full refresh if it is now 3153 a different multiple of COLS. Also get rid of superfluous do_refresh 3154 vars now that we have edit_refresh_needed. 3155 3156 2009-12-09 David Lawrence Ramsey <pooka109@gmail.com> 3157 * global.c (shortcut_init), browser.c (do_browser): Fix M-W not being bound to 3158 research in either main menu or browser. 3159 3160 2009-12-09 Chris Allegretta <chrisa@asty.org> 3161 * files.c (read_file): Add parameter for whether we should even try to check 3162 file writability, as the message is useless when we're inserting into an 3163 existing buffer. Fixes Savannah bug #28219. 3164 3165 2009-12-07 David Lawrence Ramsey <pooka109@gmail.com> 3166 * global.c (shortcut_init): Many fixes for keybindings code oversights, including 3167 restore page up/down and GotoDir in browser. 3168 * browser.c (do_browser): Fix breaking out of a submenu (e.g. gotodir), it broke 3169 out of the browser altogether. 3170 * doc/nanorc.sample.in: Add missing entries for fortran/ObjC/OCaml entries. 3171 3172 2009-12-03 David Lawrence Ramsey <pooka109@gmail.com> 3173 * global.c (shortcut_init): Remove help shortcut from help shortcut list. :-) Tweaked 3174 to reorder exit shortcut to end of list to not mess up prev/next shortcut symmetry. 3175 3176 2009-12-03 Eitan Adler <eitanadlerlist@gmail.com> 3177 * doc/syntax/makefile.nanorc: Fix poor regex for all alpha characters which sometimes 3178 leads to error messages, reported by gibboris@gmail.com. 3179 3180 2009-12-02 Chris Allegretta <chrisa@asty.org> 3181 * text.c (add_undo, do_undo, do_redo): Do not execute cases for SPLIT when 3182 DISABLE_WRAPPING is defined. Fixes Savannah bug #28151 (anon). 3183 3184 2009-12-02 Jordi Mallach <jordi@gnu.org> 3185 * doc/man/nano.1: Fix escaping of hyphens for the -$ option. 3186 3187 2009-12-01 Kamil Dudka <kdudka@redhat.com> 3188 * chars.c, file.c: Better handle unused results for things like mbtowc(), new 3189 macro IGNORE_CALL_RESULT. 3190 3191 2009-12-01 Chris Allegretta <chrisa@asty.org> 3192 * global.c (shortcut_init): Remove redundant entries for ^Y/^V reported by 3193 Christian Weisgerber. 3194 * doc/man/nanorc.5: Fix typo in Meta documentation, reported by <gibboris@gmail.com>. 3195 3196 2009-12-01 David Lawrence Ramsey <pooka109@gmail.com> 3197 * global.c (shortcut_init): Add support for ^P and ^N in the help menu. 3198 * Update documentation for 2.2 features including sample nanorc file, texinfo 3199 file, man pages, UPGRADE file, and update copyright notice for the current year. 3200 3201 GNU nano 2.2.0 - 2009.11.30 3202 3203 2009-11-29 Chris Allegretta <chrisa@asty.org> 3204 * prompt.c (get_prompt_string): Universally handle help key when it is disabled. 3205 Fixes Savannah bug #28117 by David Lawrence Ramsey <pooka109@gmail.com>. 3206 * chars.c, files.c: Add junk vars to silence the compiler. Sigh. 3207 3208 2009-11-29 David Lawrence Ramsey <pooka109@gmail.com> 3209 * Change several *chars to const char, additional cleanups and casts to make compilers happier. 3210 * global.c: Fix replace and insert file initializations for proper compilation options. 3211 * nano.c (do_suspend): Update comments to reflect actual code path, bad Chris, and thanks for 3212 noticing, Jordi. 3213 * configure.ac: Fix typos. 3214 3215 2009-11-27 Chris Allegretta <chrisa@asty.org> 3216 * nano.c (do_suspend): Don't clear the screen but do move the cursor down to the last line 3217 first in an effort to not corrupt the screen, which contradicts Pico but is consistent 3218 with almost all other text editors. Fixes Savannah bug #28110 / Debian bug 460510 3219 reported by Tim Connors <reportbug@rather.puzzling.org>. 3220 * doc/syntax/makefile.nanorc: Sample Makefile highlighting based on wiki.linuxhelp.net version. 3221 3222 2009-11-26 Chris Allegretta <chrisa@asty.org> 3223 * winio.c (edit_scroll): Adjust for long lines when scrolling. 3224 * rcfile.c (parse_rcfile): initialize size argument to getline(), fixes crash on FreeBSD 3225 reported by Eitan Adler <eitanadlerlist@gmail.com>. 3226 3227 2009-11-26 Jordi Mallach <jordi@gnu.org> 3228 * doc/man/*: Update all man pages to escape unescaped hyphens. 3229 3230 2009-11-24 Chris Allegretta <chrisa@asty.org> 3231 * move.c (do_page_up, do_page_down): Make these functions work better with soft 3232 line wrapping. 3233 * winio.c (compute_maxrows): Make maxrows calculation more accurate when all lines are > COLS. 3234 3235 2009-11-22 Chris Allegretta <chrisa@asty.org> 3236 * nano.c (main): Allow edit_refresh_needed to take effect when using --enable-tiny 3237 (fixes Savannah bug #28076 reported by David Lawrence Ramsey). 3238 3239 2009-11-22 David Lawrence Ramsey <pooka109@gmail.com> 3240 * nano.c (move_to_filestruct): Fix bug 71 (cut at top of line recenters). 3241 * Fix compilation with --enable-tiny. 3242 3243 2009-11-22 Mike Frysinger <vapier@gentoo.org> 3244 * doc/syntax/gentoo.nanorc: Tweak comment highlighting. 3245 3246 GNU nano 2.1.99pre2 - 2009.11.21 3247 3248 2009-11-21 Chris Allegretta <chrisa@asty.org> 3249 * rcfile.c: Add unbinding keyword, fixes Savannah bug #22852 reported by frankd. 3250 * prompt.c (update_statusbar_line): Set statusbar_pww when updating the line. 3251 Fixes Savannah bug #24957 reported by Mike Frysinger. 3252 3253 2009-11-19 Chris Allegretta <chrisa@asty.org> 3254 * nano.c (die_save_file): Try and match the permissions of the file we were 3255 editing but only make a minimal effort to do so. Fixes Savannah bug #27273 3256 reported by Mike Frysinger. 3257 3258 2009-11-18 Adrian Bunk <bunk via Savannah> 3259 * nano.c (main): Allow --fill and --nowrap to override nanorc entries 3260 and each other on the command line. 3261 3262 2009-11-15 Chris Allegretta <chrisa@asty.org> 3263 * winio.c (edit_refresh): Always computer maxsize regardless of whether smooth scrolling 3264 is enabled. Fixes Savannah bug #28024 by Mike Frysinger. 3265 3266 GNU nano 2.1.99pre1 - 2009.11.15 3267 3268 2009-11-14 Chris Allegretta <chrisa@asty.org> 3269 * move.c (do_first_line, do_last_line): Just set edit_refresh_needed 3270 rather than get messy. 3271 * files.c (do_writeout): Only mention file modification if we're 3272 writing the same file we originally opened. 3273 3274 2009-11-13 Chris Allegretta <chrisa@asty.org> 3275 * winio.c: Add new static maxsize for easier calculation with softwrap. 3276 * nano.c (do_mouse): Fix mouse support not working with soft wrapping. 3277 Fixes Savannah bug #27549 reported by Hannes Schueller. 3278 3279 2009-11-11 Chris Allegretta <chrisa@asty.org> 3280 * winio.c: Large tweaking of cursor and text display based on COLS not COLS - 1, 3281 due to finally understanding that display_string wasn't being called properly 3282 when softwrap was enabled. Fixes Savannah bug #27603, "Return key doesn't scroll 3283 viewport" reported by Hannes Schueller. 3284 * Fix size_t formatting issues with -pedantic 3285 3286 2009-11-09 Chris Allegretta <chrisa@asty.org> 3287 * files.c (read_file): Remove debugging messages from file load. 3288 Fixes Savannah bug #27838. 3289 3290 2009-11-07 Chris Allegretta <chrisa@asty.org> 3291 * nano.h: Add bogus value at begin of flags enumeration because it 3292 caused the casesens rcfile option to misbehave, reported by Helmut 3293 Jarausch <jarausch@igpm.rwth-aachen.de>. 3294 3295 2009-11-03 Chris Allegretta <chrisa@asty.org> 3296 * nano.h: Fix comma at end of enumerator list which angers -pedantic. 3297 * rcfile.c: Add in specific check for UNDOABLE and fix declaration as 3298 to what flag it toggles. Fixes undo mode being able to be called from 3299 the rc file, reported by Helmut Jarausch <jarausch@igpm.rwth-aachen.de>. 3300 3301 2009-11-03 Mike Frysinger <vapier@gentoo.org> 3302 * files.c: Move up is_file_writable() to stop implicit definition complaints. 3303 3304 2009-10-27 Chris Allegretta <chrisa@asty.org> 3305 * browser.c (browser_init): Set column width to something sane when 3306 initializing in a directory with no file entries. Fixes Savannah 3307 bug #24163 found (and initial patch) by Paul Wise. 3308 3309 2009-09-15 Chris Allegretta <chrisa@asty.org> 3310 * winio.c: Clean up some unused variables from the soft wrapping code. 3311 3312 GNU nano 2.1.11 - 2009.09.14 3313 3314 2009-09-12 Chris Allegretta <chrisa@asty.org> 3315 * winio.c (edit_update): properly update edittop when using soft wrapping. 3316 Fixes lack of centering for searching for off-screen answers, found by 3317 Hannes Schueller <mr_creosote@mutantwatch.de>. 3318 3319 2009-09-03 Chris Allegretta <chrisa@asty.org> 3320 * global.c (shortcut_init): Fix up/down keys not responding in the file browser, 3321 discovered by Hannes Schueller <mr_creosote@mutantwatch.de>. 3322 * move.c (do_up): Fix another scrolling issue with softwrap when the cursor 3323 is beyond COLS, discovered by Hannes Schueller <mr_creosote@mutantwatch.de>. 3324 3325 2009-09-02 Chris Allegretta <chrisa@asty.org> 3326 * Attempt to check file writability and emit a warning on the status bar 3327 if nano doesn't think the file can be written to. Feature originally 3328 requested by Damien Joldersma <damien@skullsquad.com> et al. 3329 3330 2009-08-29 Chris Allegretta <chrisa@asty.org> 3331 * Fix more soft wrapping issues, particularly with scrolling, 3332 discovered by Hannes Schueller <mr_creosote@mutantwatch.de>. 3333 3334 2009-08-19 Chris Allegretta <chrisa@asty.org> 3335 * Fix issue with soft wrapping not displaying the last character of each line, 3336 fixed bug discovered by Hannes Schueller <mr_creosote@mutantwatch.de>. 3337 3338 2009-08-17 Mike Frysinger <vapier@gentoo.org> 3339 * doc/syntax/(gentoo|sh|tcl).nanorc: Fix problems with empty regexes on POSIX. 3340 Fixes Savannah bug #27175. 3341 3342 2009-08-17 Chris Allegretta <chrisa@asty.org> 3343 * Initial soft line wrapping implementation. Command-line flags -$ or --softwrap. 3344 * nano.c, text.c: Clean up some fprintf warnings in debug mode due to printing 3345 a size_t without using the zd specifier. 3346 3347 2009-08-13 Chris Allegretta <chrisa@asty.org> 3348 * New global flag implementation courtesy of Adam Wysocki <gophi@arcabit.pl>, allows 3349 previous undo flag to be implemented consistent with other flags. 3350 3351 GNU nano 2.1.10 - 2009.07.28 3352 3353 2009-07-27 Chris Allegretta <chrisa@asty.org> 3354 * text.c (undo_cut, redo_cut): Don't actually try and undo/redo an empty cut, i.e. the magicline. 3355 Fixes crash on cutting last line discovered by Eitan Adler <eitanadlerlist@gmail.com>. 3356 3357 2009-07-11 Chris Allegretta <chrisa@asty.org> 3358 * nano-regress: Small tweaks. 3359 * Change undo code to off unless enabled via a command line option (-u/--undo). 3360 Until this code stabilizes this is the only responsible way to treat it. 3361 3362 2009-03-08 Chris Allegretta <chrisa@asty.org> 3363 * TODO: Break out some targets for various features into 2.2 3364 and 2.4 series for things which are feasible. 3365 3366 2009-02-28 Chris Allegretta <chrisa@asty.org> 3367 * configure.ac: Add check for whether _XOPEN_SOURCE_EXTENDED is needed for 3368 curses to work w/color. Fixes compilation on HP-UX with older GCC, 3369 reported by jay.krell@cornell.edu. 3370 3371 2009-02-23 Eitan Adler <eitanadlerlist@gmail.com> 3372 * doc/man/Makefile.am: Fix make variable substitution to be more portable. 3373 3374 2009-02-23 Chris Allegretta <chrisa@asty.org> 3375 * rcfile.c (parse_keybinding): Define a var before tryung to use it. Whoops! 3376 * fix some redefinitions causing compiler warnings, from Eitan Adler. Other 3377 (hopefully) fixes for uncasted malloc()s, reported by the same. 3378 * doc/man/fr/Makefile.am: Add groff check fix to fr files. 3379 3380 GNU nano 2.1.9 - 2009.02.16 3381 3382 2009-02-16 Chris Allegretta <chrisa@asty.org> 3383 * Add new argument to reset_multis for force redraws without attempting to 3384 guess whether we need to, for functions that we don't have good info about 3385 the text state. New utility function color.c:reset_multis_for_id(). 3386 3387 2009-02-15 Chris Allegretta <chrisa@asty.org> 3388 * configure.ac, doc/man/Makefile.am: Add check for HTML output support in GNU 3389 groff. Fixes Savannah bug #24461: build traps on groff. Also, add installation 3390 of html-ized man pages to $datadir/nano/man-html, since we should probably 3391 install files we went to all the trouble of generating. 3392 3393 2009-02-14 Chris Allegretta <chrisa@asty.org> 3394 * nano.c (precalc_multicolorinfo): Add debugging so we have a better clue if further 3395 issues arise. Also start at the beginning of later lines when trying to match the 3396 end of a multi-line regex. Fixes more overly aggressive highlighting found by 3397 Mike Frysinger. Finally, advance to the match end for performance. 3398 3399 2009-02-11 Chris Allegretta <chrisa@asty.org> 3400 * nanorc.c (parse_include): Do call real_dir_from_tilde() on included 3401 files in .nanorc, but still avoiding bug #25297. Fixes ~ and ~user 3402 specifications for nanorc include files, as reported by Eitan Adler. 3403 3404 2009-02-09 Chris Allegretta <chrisa@asty.org> 3405 * New option -q, --quiet, rcfile option "quiet" implemented. Skips printing 3406 errors about the rcfile and asking user to press enter. Also, nano should 3407 now only ask for one enter press when there is an error when not using -q. 3408 Based on discussion between Eitan Adler and Mike Frysinger. 3409 * rcfile.c (parse_keybinding): Significant cleanups and fixes for 3410 detecting and reporting errors in key bindings code. 3411 3412 2009-02-08 Chris Allegretta <chrisa@asty.org> 3413 * Make reset_multidata reset more lines, since contrary to previous problems the 3414 syntax highlting is now too *un*ambitious, causing display glitches when 3415 deleting a regex boundary. 3416 * Add more multidata initliazers for new buffers and 'magic lines'. Fixes segfaults 3417 with syntax highlighting in new buffers, initially reported by Mike Frysinger. 3418 3419 GNU nano 2.1.8 - 2009.02.07 3420 3421 2009-02-06 Chris Allegretta <chrisa@asty.org> 3422 * rcfile.c (parse_include): Abort on being unable to open an included rcfile. 3423 Fixes Savannah bug #25490, nanorc: "include"ing a file which doesn't exist 3424 causes nano to segfault. 3425 3426 2009-02-05 Chris Allegretta <chrisa@asty.org> 3427 * More color syntax speedups: Determine in reset_multis() whether we really need to call 3428 edit_refresh(). Additional global var edit_refresh_needed() to hopefully reduce 3429 repeated calls to the function. New helper funcs reset_multis_before() and 3430 reset_multis_after(). 3431 3432 2009-02-02 Chris Allegretta <chrisa@asty.org> 3433 * New color precalculation code for mult-line regexes. New function precalc_multicolorinfo(), 3434 new structure multidata for keeping track of where regexes start/stop. More 3435 performance improvements forthcoming. 3436 3437 2009-01-29 Chris Allegretta <chrisa@asty.org> 3438 * nano.c (move_to_filestruct): Properly initialize new fileage for multiswatching, sigh. 3439 Fix cut segfaults discovered by Mike Frysinger. 3440 3441 2009-01-29 Chris Allegretta <chrisa@asty.org> 3442 * nano.c (main): Add support for nano acting like a pager when invoked with - as first 3443 file argument. 3444 3445 2009-01-28 Davide Pesavento <davidepesa@gmail.com> 3446 * doc/syntax/gentoo.nanorc: Updates from David and Mike Frysinger. 3447 3448 2009-01-25 Chris Allegretta <chrisa@asty.org> 3449 * files.c (open_file), nanorc.c (parse_include): Don't get_full_path on included 3450 rc files, due to it potentially impacting the ability to read files in nano's 3451 cwd(). Fixes Savannah bug #25297 reported by Mike Frysinger. 3452 3453 2009-01-24 Chris Allegretta <chrisa@asty.org> 3454 * First pass at some caching of color info. Right now it's only for 3455 multi-line regexes but this may not be enough to increase performance. 3456 * Add interruptability to search functions. New functions enable_nodelay and 3457 disable_nodelay and changes to the routines to handle checking for pending 3458 searches. Fixes Savannah bug #24946: Need interrupt for search. 3459 3460 2009-01-19 Chris Allegretta <chrisa@asty.org> 3461 * Change function definitions to shorts instead of (void *)s. New mapping function 3462 iso_me_harder_funcmap(). Fixes compilation complaints with -pedantic, 3463 reported by Eitan Adler <eitanadlerlist@gmail.com>. 3464 3465 GNU nano 2.1.7 - 2008.11.10 3466 3467 2008-10-20 Chris Allegretta <chrisa@asty.org> 3468 * files.c (do_writeout): Add check for file modification when saving 3469 the file so the user can at least know they may be blowing away changes. 3470 3471 2008-10-14 Chris Allegretta <chrisa@asty.org> 3472 * nanorc.5: Fix redo man page entry and update explanation, reported by 3473 Eitan Adler <eitanadlerlist@gmail.com>. 3474 * global.c (shortcut_init), search.c (search_init): Fix add_to_sclist for ^W^T so 3475 invalid messages will display properly. Fixes Savannah bug #24507. 3476 3477 2008-10-13 Chris Allegretta <chrisa@asty.org> 3478 * Remove CUTTOEND as an undo type as it's unneeded, fix u->to_end logic in undo struct. 3479 * undo.c (update_undo): Don't free cutbuffer if NULL, fixes Savannah bug #24499. 3480 3481 2008-10-04 Chris Allegretta <chrisa@asty.org> 3482 * cut.c (add_undo): Save last cut undo information so it can be used for 3483 next uncut, fixes Savannah bug #24183. 3484 3485 GNU nano 2.1.6 - 2008.10.03 3486 3487 2008-10-03 Pascal Gentil <pascal.gentil@univ-rennes1.fr> 3488 * fortran.nanorc: Sample Fortran syntax highlighting file. 3489 3490 2008-09-30 Dirkjan Ochtman <dirkjan@ochtman.nl> 3491 * python.nanorc: Small Python syntax update. 3492 3493 2008-09-30 <bluestorm_dylc@hotmail.com> 3494 * ocaml.nanorc: Sample OCaml syntax highlighting file. 3495 3496 2008-09-30 Dave Geering <dgeering@toshiba-tap.com> 3497 * objc.nanorc: Sample Objective-C syntax highlighting file. 3498 3499 2008-09-30 Chris Allegretta <chrisa@asty.org> 3500 * configure.ac: Change extra, multibuffer, color and rcfile configure options 3501 to default to enabled --enable-tiny will now disable these options as well. 3502 * python.nanorc, ruby.nanorc: Add header lines for Python and Ruby as well. 3503 3504 2008-09-21 Chris Allegretta <chrisa@asty.org> 3505 * rcfile.c, color.c, nano.h: Add new capability for matching a syntax type by 3506 the "header" (1st line) of a file being edited. Based on Savannah bug #24197 3507 and initial proof of concept by Dave Geering <dgeering@toshiba-tap.com>. 3508 3509 2008-09-16 Chris Allegretta <chrisa@asty.org> 3510 * text.c: Add support for undoing a text uncut. Split out the undo and redo 3511 of a text cut in order to avoid code duplication. 3512 3513 2008-09-06 Chris Allegretta <chrisa@asty.org> 3514 * nano.c: Do call disable_signals at startup regardless, since under Cygwin 3515 we can't generate ^C without it. 3516 3517 GNU nano 2.1.5 - 2008.08.30 3518 3519 2008-08-29 Chris Allegretta <chrisa@asty.org> 3520 * configure.ac, color.c, rcfile.c, utils.c: 1st attempt at supporting systems 3521 which don't support GNU-style word boundaries. New function fixbounds() to 3522 translate from GNU-style to BSD-style, autoconf option GNU_WORDBOUNDS. 3523 * nano-regress: New perl script to check for some of the more obvious issues 3524 with compilation issues with certain configure options. 3525 * global.c, help.c, browser.c, files.c, proto.h: Fix several compilation and 3526 programmatic issues with --disable-help, especially that do-writeout was 3527 treating ^G the same as ^M. 3528 3529 2008-08-28 Chris Allegretta <chrisa@asty.org> 3530 * configure.ac, rcfile.c: Add support for an alternate rcfilename at configure time. Maybe this 3531 should become a command line option some day, but I don't see the need currently. Start of 3532 fix for Savannah bug #24128: Add nanorc support to win32 platform. 3533 3534 2008-08-21 Chris Allegretta <chrisa@asty.org> 3535 * text.c: Change error messages where we may possibly get into a bad state and urge the 3536 user to save when this happens. Originally by Benno Schulenberg <bensberg@justemail.net> 3537 * text.c (do_enter): Fix issue when compiled with --enable-debug, fixes Savannah bug #24092. 3538 3539 2008-08-08 Magnus Granberg <zorry@ume.nu> / Adam Conrad <?> 3540 * files.c (write_file): Add needed flags to open() calls when writing out files. 3541 Fixes Savannah bug #23827: Compilation fails with -D_FORTIFY_SOURCE=2. 3542 3543 2008-08-08 Chris Allegretta <chrisa@asty.org> 3544 * files.c (write_file): Check the exit code of fclose(), since in certain 3545 out-of-space conditions the OS will happily report successful fwrite()s 3546 until you try and close the file. Fixes Savannah bug #24000: no free 3547 space on partition - nano claims successful write - file is empty. 3548 3549 GNU nano 2.1.4 - 2008.08.09 3550 3551 2008-08-08 Chris Allegretta <chrisa@asty.org> 3552 * files.c (write_file): Do not go on and attempt to write the main file if writing 3553 the backup file failed, related to Savannah bug #24000. 3554 * text.c (do_redo): Fix improperly restoring the text when redoing a line split. 3555 * text.c (add_undo): Fix check for multi-line cut check skips adding other new legit events. 3556 3557 2008-07-23 Chris Allegretta <chrisa@asty.org> 3558 * text.c: Reset openfile->last_action to OTHER after an undo or redo 3559 so we don't mistakenly think this is an update when it's really an 3560 add. Also fix a mistaken ; after an if statement which made nano 3561 try to free a struct which might be NULL. 3562 3563 GNU nano 2.1.3 - 2008.08.04 3564 3565 2008-07-23 Chris Allegretta <chrisa@asty.org> 3566 * configure.ac: Add ncursesw dir to include path if lib is detected. 3567 3568 2008-07-11 Mike Frysinger <vapier@gentoo.org> 3569 * doc/nanorc.sample.in: Include the updated files in the default sample nanorc. 3570 3571 2008-07-11 Fabian Groffen <grobian@gentoo.org> 3572 * nano.c: Don't include langinfo.h if not using ENABLE_UTF8 3573 (Savannah patch #6565). 3574 3575 2008-07-11 Mitsuya Shibata <mty.shibata@gmail.com> 3576 * text.c: Fix crashing in help menu when using certain locales 3577 (Savannah bug #23751). 3578 3579 2008-07-09 Chris Allegretta <chrisa@asty.org> 3580 * nano.c/nano.h/global.c/text.c: New generalized undo code, currently 3581 just works for adding and deleting text and splitting and unsplitting lines. 3582 3583 2008-06-29 Chris Allegretta <chrisa@asty.org> 3584 * global.c: Fix for not having a search history when --disable-justify is used 3585 (Savannah bug #23733). 3586 3587 GNU nano 2.1.2 - 2008.06.24 3588 3589 2008-06-24 Chris Allegretta <chrisa@asty.org> 3590 * rcfile.c: Added function check_bad_binding() to look for sequences which 3591 shouldn't be bound, per Savannah bug #22674. 3592 3593 2008-05-31 Chris Allegretta <chrisa@asty.org> 3594 * prompt.c,search.c,global.c: Tentative fix for bug #23144: using arrow 3595 keys in search buffer affects main window (by Mike Frysinger). 3596 3597 2008-05-31 Chris Allegretta <chrisa@asty.org> 3598 * global.c: Fix for Savannah bug #23442: left/right arrow keys 3599 do not work with --enable-tiny (by Mike Frysinger). 3600 3601 2008-05-31 Chris Allegretta <chrisa@asty.org> 3602 * files.c,proto.h,text.c: Fix for conflicts with AIX curses 3603 variables, from William Jojo <jojowil@hvcc.edu>. 3604 3605 2008-05-31 Chris Allegretta <chrisa@asty.org> 3606 * global.c: Fix for compile error when --disable-speller is used 3607 (Savannah bug #23227 by Mike Frysinger). 3608 3609 2008-05-31 Chris Allegretta <chrisa@asty.org> 3610 * Fix for seg fault when window size is too small, 3611 by Andreas Amann <andreas.amann@tyndall.ie>. 3612 3613 GNU nano 2.1.1 - 2008.04.01 3614 3615 2008-05-31 Chris Allegretta <chrisa@asty.org> 3616 * Added the following contributed files, by owner: 3617 Donnie Berkholz <dberkholz@gentoo.org> 3618 * Sample awk.nanorc 3619 Simon Rupf <simon.rupf@int-ag.ch> 3620 * Sample css.nanorc 3621 Josef 'Jupp' Schugt <jupp@rubyforge.org> 3622 * Sample ruby.nanorc 3623 3624 2008-03-31 Chris Allegretta <chrisa@asty.org> 3625 * global.c: Fix for issues compiling with --enable-tiny and 3626 --enable-multibuffer, as reported by Mike Frysinger. 3627 * files.c: Fix the fact that the insert file prompt text did not 3628 properly appears in tiny mode. 3629 3630 2008-03-19 Benno Schulenberg <bensberg@justemail.net> 3631 * help.c, nano.c: Fix toggle help not being translated, fix allocation 3632 issue. 3633 3634 2008-03-19 Chris Allegretta <chrisa@asty.org> 3635 * global.c: Fix bracket matching sequence to be M-] not M-[, as reported 3636 Nick Warne <nick@ukfsn.org>. 3637 * doc/syntax/Makefile.am: Actually include new syntaxes from Mike, etc. 3638 * debian.nanorc: New debian sources.list config since we're including 3639 gentoo, adapted from Milian Wolff <mail@milianw.de>. 3640 3641 2008-03-18 Mike Frysinger <vapier@gentoo.org> 3642 * winio.c: Remove unneeded variable in parse_kbinput(). 3643 * rcfile.c: Relocate check_vitals_mapped() function to just above where 3644 it actually gets used and declare it "static void" in the process. 3645 * global.c: Only declare nano_justify_msg when justify support is enabled. 3646 * php.nanorc: Php syntax highlighting config. 3647 * tcl.nanorc: Tcl syntax highlighting config. 3648 * gentoo.nanorc: Gentoo syntax highlighting config. 3649 3650 2008-03-17 Benno Schulenberg <bensberg@justemail.net> 3651 * global.c: Fix incorrect first line jump message, fix 3652 more comments to assist translators. 3653 * winio.c: Fix shortcut labels not being translated. 3654 3655 2008-03-17 Mike Frysinger <vapier@gentoo.org> 3656 * */.gitignore: Git ignore files for those running a local git 3657 against SVN. 3658 3659 2008-03-16 Benno Schulenberg <bensberg@justemail.net> 3660 * src/help.c, src/global: Fix help strings no longer being 3661 translated properly. 3662 * src/global.c, doc/man/nanorc.5: Fix typos and poorly worded 3663 lines in the source and man pages. 3664 3665 2008-03-04 Chris Allegretta <chrisa@asty.org> 3666 * everything: New shortcut backend. New structs subnfunc 3667 for menu functions and toggles and sc for shortcut keys, old 3668 'shortcut' and 'toggles' structs are gone. The current implementation 3669 has a bunch of broken stuff (some of which is documented in BUGS). 3670 Updated nanorc.5 with some mostly complete documentation on configuring. 3671 3672 2007-12-20 David Lawrence Ramsey <pooka109@gmail.com> 3673 * AUTHORS, doc/faq.html: Update maintenance information. 3674 * NEWS: Resync with NEWS from the 2.0 branch. 3675 3676 2007-12-18 David Lawrence Ramsey <pooka109@gmail.com> 3677 * nano.c (print_opt_full): Use strlenpt() instead of strlen(), 3678 so that tabs are placed properly when displaying translated 3679 strings in UTF-8, as found by Jean-Philippe Guérard. 3680 3681 2007-12-17 David Lawrence Ramsey <pooka109@gmail.com> 3682 * configure.ac, doc/texinfo/nano.texi, nano.c (terminal_init): 3683 Change slang curses emulation support to turn off the same 3684 options as --enable-tiny, as it's hopelessly broken otherwise. 3685 * nano.c (disable_signals, main): Simplify terminal handling by 3686 using raw mode instead of cbreak mode. 3687 * text.c (execute_command): Call terminal_init() instead of just 3688 disable_signals() after executing the command, as the command 3689 may have changed the terminal settings. 3690 * ChangeLog.pre-2.1: Add missing attribution. 3691 * NEWS: Resync with NEWS from the 2.0 branch. 3692 3693 2007-12-10 David Lawrence Ramsey <pooka109@gmail.com> 3694 * nano.c (main): Exit if initscr() fails. 3695 3696 2007-12-09 David Lawrence Ramsey <pooka109@gmail.com> 3697 * faq.html: Add minor punctuation and wording fixes, and update 3698 various sections to account for Alpine. 3699 3700 2007-12-08 David Lawrence Ramsey <pooka109@gmail.com> 3701 * prompt.c (do_statusbar_mouse, reset_statusbar_cursor, 3702 update_statusbar_line, need_statusbar_horizontal_update): Fix 3703 minor display and cursor placement problems when scrolling 3704 between pages at the statusbar prompt. 3705 3706 2007-12-07 David Lawrence Ramsey <pooka109@gmail.com> 3707 * winio.c (get_mouseinput): Fix longstanding problem where mouse 3708 clicks on the statusbar prompt text wouldn't be recognized 3709 unless the NO_HELP flag was turned off. 3710 * doc/man/rnano.1, doc/man/fr/rnano.1: Update copyright notices, 3711 as Thijs Kinkhorst's copyrights have now been assigned to the 3712 Free Software Foundation. 3713 3714 2007-12-04 David Lawrence Ramsey <pooka109@gmail.com> 3715 * nano.c (main), prompt.c (get_prompt_string), winio.c 3716 (do_replace_highlight): Per OKATA Akio's patch, with minor 3717 tweaks by me, add wnoutrefresh() calls after 3718 reset_(statusbar_)?cursor() calls, to ensure that the cursor is 3719 placed properly when using NetBSD curses. 3720 * nano.c (disable_mouse_support, enable_mouse_support): When 3721 toggling mouse support on or off, save and restore the mouse 3722 click interval. 3723 3724 2007-11-29 Jean-Philippe Guérard <jean-philippe.guerard@tigreraye.org> 3725 * doc/man/fr/*.1, doc/man/fr/nanorc.5: Fix copyright notices. 3726 The copyrights are disclaimed on these translations, but the 3727 copyrights of the untranslated works also apply. 3728 3729 2007-11-28 David Lawrence Ramsey <pooka109@gmail.com> 3730 * doc/man/fr/nanorc.5: Remove trailing whitespace. 3731 3732 2007-11-17 David Lawrence Ramsey <pooka109@gmail.com> 3733 * files.c (read_file): Improve autodetection of DOS and Mac 3734 format files to not trigger on carriage returns in the middle of 3735 files, as found by Kjell Braden. 3736 3737 2007-11-06 David Lawrence Ramsey <pooka109@gmail.com> 3738 * doc/man/rnano.1, doc/man/fr/rnano.1: Update copyright notices, 3739 as Jordi Mallach's copyrights have now been assigned to the Free 3740 Software Foundation. 3741 3742 2007-11-05 David Lawrence Ramsey <pooka109@gmail.com> 3743 * search.c (do_gotolinecolumn): Use a clearer error message if 3744 we enter an invalid line or column number, per Mike Melanson's 3745 suggestion. 3746 3747 2007-10-11 David Lawrence Ramsey <pooka109@gmail.com> 3748 * doc/man/nano.1, doc/man/fr/nano.1, doc/texinfo/nano.texi, 3749 src/*.c, src/*.h: Update copyright notices, as Chris 3750 Allegretta's copyrights have now been assigned to the Free 3751 Software Foundation. 3752 * doc/man/nanorc.5, doc/man/fr/nanorc.5: Make copyright notices 3753 for these files consistent in style. 3754 * files.c (cwd_tab_completion): Remove unneeded assert. 3755 * files.c (username_tab_completion, cwd_tab_completion): Rename 3756 variable buflen to buf_len, for consistency. 3757 * files.c (input_tab): Disable completion of usernames, 3758 directories, and filenames if the cursor isn't at the end of the 3759 line, as it can lead to odd behavior (e.g. adding a copy of the 3760 entire match to the middle of the line instead of just the 3761 uncompleted part of the match). 3762 3763 2007-10-05 David Lawrence Ramsey <pooka109@gmail.com> 3764 * src/*.c, src/*.h: Update copyright notices, as my copyrights 3765 have now been assigned to the Free Software Foundation. 3766 3767 2007-09-16 David Lawrence Ramsey <pooka109@gmail.com> 3768 * winio.c (edit_scroll): Fix problem where the screen wouldn't 3769 be updated properly if you paged up with the first line of the 3770 file onscreen and the mark on. 3771 3772 2007-08-26 David Lawrence Ramsey <pooka109@gmail.com> 3773 * doc/faq.html: Update links to the Free Translation Project. 3774 3775 2007-08-23 Jean-Philippe Guérard <jean-philippe.guerard@tigreraye.org> 3776 * doc/man/fr/*.1, doc/man/fr/nanorc.5: Add translation of new 3777 licensing terms. 3778 3779 2007-08-23 David Lawrence Ramsey <pooka109@gmail.com> 3780 * doc/man/fr/*.1, doc/man/fr/nanorc.5: Delete translation of 3781 old licensing terms, until it can be updated. 3782 3783 2007-08-22 David Lawrence Ramsey <pooka109@gmail.com> 3784 * COPYING.DOC: Add a copy of the GNU FDL version 1.2. 3785 * Makefile.am: Add COPYING.DOC to EXTRA_DIST. 3786 * doc/man/*.1, doc/man/nanorc.5, doc/man/fr/*.1, 3787 doc/man/fr/nanorc.5, doc/texinfo/nano.texi: Relicense to the GNU 3788 GPL version 3 or later/the GNU FDL version 1.2 or later with no 3789 Invariant Sections, Front-Cover Texts, or Back-Cover Texts. 3790 3791 2007-08-21 David Lawrence Ramsey <pooka109@gmail.com> 3792 * doc/man/rnano.1, doc/man/fr/rnano.1: Add missing copyright 3793 notice from nano-tiny.1, which rnano.1 is based on. 3794 * doc/man/fr/nano.1, doc/man/fr/nanorc.5, doc/man/fr/rnano.1: 3795 Make all copyright notices consistent. 3796 3797 2007-08-16 David Lawrence Ramsey <pooka109@gmail.com> 3798 * files.c (do_insertfile): Properly handle more cases of 3799 inserting a file with the mark on. 3800 * nano.c (copy_from_file): Properly handle more cases of 3801 uncutting text with the mark on. 3802 3803 2007-08-15 David Lawrence Ramsey <pooka109@gmail.com> 3804 * Makefile.am: Remove erroneous backslash after 3805 ChangeLog.pre-2.1 in EXTRA_DIST, so that "make dist" works 3806 again. 3807 * files.c (do_insertfile): Make sure the mark is always properly 3808 positioned after inserting a file with the mark on. 3809 * nano.c (copy_from_file): Make sure the mark is always properly 3810 positioned after uncutting multiple lines with the mark on. 3811 3812 2007-08-11 David Lawrence Ramsey <pooka109@gmail.com> 3813 * COPYING: Add a copy of the GNU GPL version 3. 3814 * configure.ac, *.c, *.h: Relicense to the GNU GPL version 3 or 3815 later. 3816 3817 2007-08-10 David Lawrence Ramsey <pooka109@gmail.com> 3818 * files.c (username_tab_completion, cwd_tab_completion, 3819 input_tab): Update copyright notice to account for 3820 modifications. 3821 * utils.c (ngetdelim): Simplify. 3822 * utils.c (ngetline, ngetdelim): Update copyright notice to 3823 account for modifications. 3824 3825 2007-08-07 David Lawrence Ramsey <pooka109@gmail.com> 3826 * nano.c (copy_from_file): Fix potential segfault, found by Paul 3827 Goins, after uncutting one line of text with the mark on by 3828 properly preserving the beginning of the mark. 3829 * nano.c (copy_from_file): Make sure the mark is always properly 3830 positioned after uncutting one line of text with the mark on. 3831 3832 2007-08-01 David Lawrence Ramsey <pooka109@gmail.com> 3833 * nano.c (version): Display copyright notices. 3834 3835 2007-07-31 David Lawrence Ramsey <pooka109@gmail.com> 3836 * configure.ac: Update copyright notice to account for 3837 modifications. 3838 3839 2007-07-29 David Lawrence Ramsey <pooka109@gmail.com> 3840 * doc/faq.html: Update RPM links for nano 2.0.x. 3841 3842 2007-07-11 David Lawrence Ramsey <pooka109@gmail.com> 3843 * files.c (copy_file): Assert that inn and out don't both point 3844 to the same file. 3845 3846 2007-07-10 David Lawrence Ramsey <pooka109@gmail.com> 3847 * chars.c (nstrcasestr, mbstrcasestr, revstrstr, revstrcasestr, 3848 mbrevstrcasestr): Simplify and rewrite to use the strncasecmp() 3849 equivalents. 3850 3851 2007-07-09 David Lawrence Ramsey <pooka109@gmail.com> 3852 * chars.c (nstrcasestr, mbstrcasestr, revstrstr, revstrcasestr, 3853 mbrevstrcasestr): Fix typo that broke the check for needle's 3854 being blank. 3855 * chars.c (mbstrncasecmp, mbstrnlen, mbstrpbrk, 3856 has_blank_mbchars): Simplify by using for loops instead of while 3857 loops where possible, to match the single-byte versions of these 3858 functions. 3859 * search.c (do_replace_loop): Fix problem where replacing e.g. 3860 single-byte characters with multibyte ones could result in 3861 openfile->totsize's being miscalculated. 3862 3863 2007-07-06 David Lawrence Ramsey <pooka109@gmail.com> 3864 * chars.c (nstrcasestr, mbstrcasestr, revstrstr, revstrcasestr, 3865 mbrevstrcasestr): Return char* instead of const char*. 3866 3867 2007-07-02 David Lawrence Ramsey <pooka109@gmail.com> 3868 * chars.c (nstrcasestr, mbstrcasestr, revstrstr, revstrcasestr, 3869 mbrevstrcasestr): For efficiency, return haystack/rev_start 3870 immediately if needle is blank. 3871 3872 2007-07-01 David Lawrence Ramsey <pooka109@gmail.com> 3873 * chars.c (nstrncasecmp, mbstrncasecmp): For efficiency, return 3874 zero immediately if s1 and s2 point to the same string. 3875 3876 2007-06-30 David Lawrence Ramsey <pooka109@gmail.com> 3877 * prompt.c (do_yesno_prompt): Remove redundant check for 3878 NO_HELP's being FALSE. 3879 3880 2007-06-28 David Lawrence Ramsey <pooka109@gmail.com> 3881 * browser.c (do_browser), nano.c (do_mouse), prompt.c 3882 (do_statusbar_mouse, do_yesno_prompt): Further simplify 3883 processing of mouse events by consolidating if clauses. 3884 * winio.c (do_mouseinput): Return unconditionally if we get a 3885 mouse event that we don't deal with, instead of inside an else 3886 clause. 3887 3888 2007-05-29 David Lawrence Ramsey <pooka109@gmail.com> 3889 * winio.c (do_mouseinput): Deal with clicks of the first mouse 3890 button again. Oddly, ncurses built without --enable-ext-mouse 3891 needs this, but ncurses built with --enable-ext-mouse doesn't. 3892 3893 2007-05-25 David Lawrence Ramsey <pooka109@gmail.com> 3894 * configure.ac, nano.c (main): Replace the current hackish check 3895 for a UTF-8 locale with a proper call to nl_langinfo(). 3896 * winio.c (get_key_buffer): Fix inaccurate comments. 3897 3898 2007-05-22 David Lawrence Ramsey <pooka109@gmail.com> 3899 * browser.c (do_browser), nano.c (do_mouse), prompt.c 3900 (do_statusbar_mouse, do_yesno_prompt), winio.c (do_mouseinput): 3901 Simplify processing of mouse events. Instead of calling 3902 wenclose() to get the window a mouse event took place in and 3903 manually adjusting the returned coordinates to be relative to 3904 that window the mouse event took place in, call wmouse_trafo(), 3905 which does both. 3906 3907 2007-05-20 David Lawrence Ramsey <pooka109@gmail.com> 3908 * browser.c (do_browser), nano.c (do_mouse), prompt.c 3909 (do_statusbar_mouse, do_yesno_prompt), winio.c (do_mouseinput): 3910 Fix processing of mouse events so that those we don't handle are 3911 ignored instead of being erroneously passed through. 3912 * winio.c (do_mouseinput): Simplify handling of mouse events 3913 involving the first mouse button by only dealing with releases. 3914 * winio.c (do_mouseinput): Improve mouse wheel support to only 3915 move the cursor if we're in the edit window or on the statusbar. 3916 3917 2007-05-15 David Lawrence Ramsey <pooka109@gmail.com> 3918 * winio.c (do_mouseinput): Add mouse wheel support, per Helmut 3919 Jarausch's suggestion. Now, if mouse support is enabled, and 3920 nano is using a version of ncurses compiled with the 3921 --enable-ext-mouse option, rolling the mouse wheel up or down 3922 will move the cursor three lines up or down. 3923 3924 2007-04-23 David Lawrence Ramsey <pooka109@gmail.com> 3925 * TODO: Add entries for fixing limitations with pasting text and 3926 handling bad/incomplete UTF-8 sequences. 3927 3928 2007-04-22 David Lawrence Ramsey <pooka109@gmail.com> 3929 * text.c (backup_lines): Avoid a segfault when the mark begins 3930 and ends on the line after the last line of the paragraph. 3931 3932 2007-04-21 David Lawrence Ramsey <pooka109@gmail.com> 3933 * files.c (do_writeout): If we're in restricted mode, we're not 3934 allowed to write selections to files, so don't display the 3935 "Write Selection to File" prompt. 3936 * files.c (do_writeout): Simplify. 3937 3938 2007-04-19 David Lawrence Ramsey <pooka109@gmail.com> 3939 * files.c (tail): Remove unneeded if statement. 3940 3941 2007-04-18 John M. Gabriele <jmg3000@gmail.com> 3942 * doc/faq.html: Add a new section 4.14 (with minor tweaks by 3943 David Lawrence Ramsey) to explain how autoindent affects pasted 3944 text. 3945 3946 2007-04-18 David Lawrence Ramsey <pooka109@gmail.com> 3947 * files.c (open_file): Open files using their full paths 3948 whenever possible, so that ~user/file.txt and "~user/file.txt" 3949 are treated the same way if ~user is a user's home directory. 3950 * files.c (real_dir_from_tilde): Simplify. 3951 * files.c (do_writeout): Properly display the warning in all 3952 cases if we try to save (a) an existing file under a different 3953 name, or (b) a file with no name under an existing file's name. 3954 * files.c (do_writeout): Rename variable different_name to 3955 do_warning, for clarity. 3956 * rcfile.c (parse_include): Open files using their full paths 3957 whenever possible, so that ~user/file.txt and "~user/file.txt" 3958 are treated the same way if ~user is a user's home directory. 3959 * rcfile.c (parse_include): Properly check for the included 3960 file's being a directory, a character file, or a block file. 3961 * rcfile.c (parse_include): For consistency, display the 3962 filename as the user entered it if we can't read the specified 3963 file. 3964 * winio.c (parse_kbinput): Interpret Cancel and Shift-Cancel. 3965 * winio.c (get_escape_seq_kbinput): Add missing comments. 3966 3967 2007-04-17 David Lawrence Ramsey <pooka109@gmail.com> 3968 * files.c (real_dir_from_tilde): Fix long-standing problem, 3969 found by Justin Fletcher, where directory names that began with 3970 "~", but that weren't users' home directories, could be 3971 erroneously treated as users' home directories (e.g. "~d/" would 3972 be treated as "~daemon/"). 3973 * files.c (input_tab): Don't bother checking if num_matches is 3974 less than zero, as it's a size_t and hence unsigned. 3975 3976 2007-04-16 David Lawrence Ramsey <pooka109@gmail.com> 3977 * files.c (real_dir_from_tilde): Fix segfault, found by Justin 3978 Fletcher, when dealing with directory names that begin with "~", 3979 but that aren't users' home directories. 3980 3981 2007-04-11 Mike Frysinger <vapier@gentoo.org> 3982 * doc/syntax/asm.nanorc, doc/syntax/c.nanorc, 3983 doc/syntax/sh.nanorc: Copy the regex that highlights trailing 3984 whitespace (with minor tweaks by David Lawrence Ramsey) from 3985 doc/syntax/java.nanorc to these files, as it's also useful in 3986 them. 3987 3988 2007-04-04 David Lawrence Ramsey <pooka109@gmail.com> 3989 * AUTHORS, faq.html: Update email address. 3990 * winio.c (get_escape_seq_kbinput): Add escape sequences for 3991 Terminal. 3992 3993 2007-02-01 Benno Schulenberg <bensberg@justemail.net> 3994 * global.c (shortcut_init): Reword the movement shortcut 3995 descriptions so that they use "Go to" instead of "Move to", 3996 since not all of them move the cursor in the same way. 3997 * global.c (shortcut_init): Reword the paragraph movement 3998 shortcut descriptions to more accurately describe how they work. 3999 * nano.c (usage): Reword the description of the -S/--smooth 4000 command line option in order to differentiate it from the 4001 associated toggle description. 4002 4003 2007-01-29 David Lawrence Ramsey <pooka109@cox.net> 4004 * ChangeLog: Rework the 2.1 branch's changelog to be more 4005 readable, per Jordi Mallach's suggestion. 4006 * ChangeLog.pre-2.1: Move the 2.0 branch's changelog here, per 4007 Jordi Mallach's suggestion. 4008 * Makefile.am: Add ChangeLog.pre-2.1 to EXTRA_DIST. 4009 * src/help.c (help_init): Add a missing space to the "Execute 4010 Command" help text.