promptfix II

Jindrich Novy jnovy at redhat.com
Thu Dec 2 09:46:26 UTC 2004


Hello mc-devel,

I'm sending again the reimplementation of promptfix patch from 24.11.
with comments. There were some problems with
http://mail.gnome.org/archives/ in that time so it didn't appeared there
and it was only available in emails.

------------------------------------------------------------------
Please see:
http://mail.gnome.org/archives/mc-devel/2004-November/msg00031.html
for the bug reproduction.

The attached patch does the following:

1st hunk:
the removed part caused to cut out the beginning of the prompt so we
get:

<truncated dir name>]$
instead of:
[jnovy at obelix <shortened dir name>]$

this part of code just prints the whole prompt without shortening to
subshell_prompt to let the prompt be displayed correctly via load_prompt
().

2nd hunk:
fix of the prompt drawing in subshell. It should display correct prompt
if it's size is less than COLS and redraw only the part of line where
was a previous prompt. If the prompt is larger that COLS, it'll draw the
prompt at a new line. Some additional work for this should be done since
we can use escape sequences to improve it a bit. And maybe we should cap
the value of COLS, etc.

3rd hunk:
Displays shrinked prompt in the panel (not subshell) mode with using
name_trunc(). This part is needed to let the prompt be displayed as
noted in the comment to 1st hunk.

Any comments are welcome.

greetings,
Jindrich

-- 
Jindrich Novy <jnovy at redhat.com>, http://people.redhat.com/jnovy/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-CVS-promptfix.patch
Type: text/x-patch
Size: 2474 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20041202/75466b39/attachment.bin>


More information about the mc-devel mailing list