Rotating Dash is not working anymore.

Pavel Roskin proski at gnu.org
Thu Dec 4 08:16:18 UTC 2003


On Tue, 2 Dec 2003, Ali Akcaagac wrote:

> ... Hello, as the topic says the Rotating Dash somehow is not working
> correctly anymore in current MC HEAD ...

It works for me, but the background color of the dash changes erratically.
So typical for mc - you look for one bug but find another.  Try this
patch, it preserves the cursor position and sets the color:

==========================
--- src/layout.c
+++ src/layout.c
@@ -851,6 +851,7 @@ void print_vfs_message (char *msg, ...)

 void rotate_dash (void)
 {
+    int col, row;
     static char rotating_dash [] = "|/-\\";
     static int pos = 0;

@@ -859,8 +860,12 @@ void rotate_dash (void)

     if (pos >= sizeof (rotating_dash)-1)
 	pos = 0;
+
+    getyx (stdscr, row, col);
     move (0, COLS-1);
+    attrset (NORMAL_COLOR);
     addch (rotating_dash [pos]);
+    move(row, col);
     mc_refresh ();
     pos++;
 }
==========================

The CVS repository is closed because of the security issues
(http://savannah.gnu.org/statement.html), but I'll apply this patch as
soon as the repository is reopened.

If the problem persists, please describe in more details how to reproduce
it.  Bug reports about all visual effects should be accompanied by the
output of "mc -V".  I only tested the configuration with internal S-Lang.

-- 
Regards,
Pavel Roskin



More information about the mc-devel mailing list