nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] address@hidden: Bug#246956: /usr/bin/nano: nowarning wh


From: David L. Ramsey
Subject: Re: [Nano-devel] address@hidden: Bug#246956: /usr/bin/nano: nowarning when trying to open non-readable file]
Date: Mon, 17 May 2004 21:46:04 -0400

--- Chris Allegretta <address@hidden> wrote:
>Hmm, seems to have been this way since 1.1.99pre1.  Here's a fix for 
>1.2, assuming Im not so rusty as to have overlooked something 
>drastic...
>
>:)

The 1.3 branch has the same problem, and I fixed it in 1.3.2-cvs earlier 
on Friday (with the exact same code, too, so I doubt you're rusty).  
However, I've been away from my Slackware box for most of this weekend, 
so I haven't gotten the chance to send it.  Thanks, in any case.

In other news, I've gone ahead and added the code to detect and use 
isblank() and strcasestr() or their equivalents, including the related 
upgrade to the minimum requirements.  I've also added some new code to 
do_justify() to implement the new "Full Justify" feature in the version 
of Pico that comes with Pine 4.60: Ctrl-J at the search prompt will now 
justify the entire file at once.  Adding that shortcut, however, made 
the shortcut list for the search prompt longer than 12, the length of 
the main list, which made the text for each shortcut 8 characters long 
at the default 80x24 size.

This cut some of them off and/or made them much harder to read, and 
shortening the abbreviations in the shortcut text would make it even 
harder to read (and would probably drive the translators insane), so I 
modified bottombars() to limit the maximum number of visible shortcuts 
to 12 so as to keep all the search prompt shortcuts 10 characters long.  
Unfortunately, this means that "Up" is no longer visible at the end of 
the list.

Pico's method of justification has apparently changed in Pine 4.60, as 
well.  It no longer shaves the last space from the end of a line where 
the unbroken line would have one space after a word or two spaces after 
punctuation; every line in the paragraph retains spaces except the last 
one.  I've been able to implement this as well, although it has to be 
done by adding spaces to the ends of the lines as they are after being 
run through justify_format(), and this unfortunately means that 
first_mod_file can no longer be used to reliably find the first changed 
line in a paragraph, so justifying any paragraph now backs up all of its 
lines and sets the MODIFIED flag (Pico at least does the latter).

(As an aside, it's interesting how often the wrapping and justifying 
behavior has changed.  The behavior nano 1.1.x had for awhile, removing 
trailing spaces when wrapping and justifying, was in at least Pico 3.5; 
the behavior after that, removing trailing spaces when justifying and 
keeping/adding them when wrapping, was in at least 4.2 and later 
versions; and the current behavior, keeping/adding spaces both when 
justifying and wrapping, is in the current version 4.7.)

Finally, I've committed nanoterm.patch, mainly because it appears to fix 
the screen corruption problem when resizing slang-enabled nano and 
cleans up some other code.

Attachment: signature.asc
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]