Black line in editor finally fixed
Pavel Roskin
proski at gnu.org
Thu Jul 5 22:36:24 UTC 2001
Hello!
This patch fixes a long-standing bug when a black line appears near the
bottom of the editor after running shell from the F11 menu. Older
versions of MC also demonstrate this bug when Ctrl-L is pressed in mcedit.
Disabling subshell in mcedit (i.e. when mc is run as "mc -e" or "mcedit")
was a workaround. This is actually a fix!
ChangeLog:
* main.c (load_prompt): Don't change prompt if midnight_dlg is
not the current dialog.
-------------------------------------------
--- main.c
+++ main.c
@@ -1128,8 +1128,9 @@ load_prompt (int fd, void *unused)
{
if (!read_subshell_prompt (QUIETLY))
return 0;
-
- if (command_prompt){
+
+ /* Don't actually change the prompt if it's invisible */
+ if (current_dlg == midnight_dlg && command_prompt){
int prompt_len;
prompt = strip_ctrl_codes (subshell_prompt);
@@ -1147,10 +1148,8 @@ load_prompt (int fd, void *unused)
* get_event channels, the prompt updating does not take place
* automatically: force a cursor update and a screen refresh
*/
- if (current_dlg == midnight_dlg){
- update_cursor (midnight_dlg);
- mc_refresh ();
- }
+ update_cursor (midnight_dlg);
+ mc_refresh ();
}
update_prompt = 1;
return 0;
-------------------------------------------
Regards,
Pavel Roskin
More information about the mc-devel
mailing list