Bug 34852 - Doesn't allow changing tabs from 8 to 3.
Summary: Doesn't allow changing tabs from 8 to 3.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: mc
Version: 7.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jonathan Blandford
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-04-05 08:46 UTC by Mike A. Harris
Modified: 2013-04-02 04:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-07-13 23:00:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Mike A. Harris 2001-04-05 08:46:42 UTC
Editing login.c from util-linux which is formatted with tabs instead
of spaces looked horrible with tabs set to 8 by default, so I changed
the tab setting from 8 to 3.  Hitting "OK", the editor changed my tab
setting to "4" instead of 3.  Thinking I hit the wrong key, I tried
to change it back to 3, and it insisted on 4 instead.

I tried tabs set to 2,3,4,5,6,7,8,9 and midnight will NOT let you choose
an "odd" number.  It looks like it is rounding up to the nearest even
number and ignoring your setting.  When you go back into the menu to
set it again, your odd number is gone and is replaced by the next higher
number.  I haven't tried on our latest rawhide to see if this exists
still.

This is easily reproduceable.

Comment 1 Pavel Roskin 2001-07-13 23:00:40 UTC
I've just fixed it in CVS:

--- editoptions.c 
+++ editoptions.c 
@@ -168,7 +168,10 @@ void edit_options_dialog (void)
                option_tab_spacing = atoi (q);
                if (option_tab_spacing < 0)
                    option_tab_spacing = 2;
+#if 0 
+               /* Only allow even numbers */ 
                option_tab_spacing += option_tab_spacing & 1;
+#endif 
                free (q);
            }
            option_syntax_highlighting = *quick_widgets[5 + OA].result;


Note You need to log in before you can comment on or make changes to this bug.