Bug: TAB & Backspace Key - Inconsistent Behavior

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Post Reply
CaliforniaJerry
Posts: 88
Joined: Sat Aug 01, 2009 4:48 am
Location: Mountain View, CA
Contact:

Bug: TAB & Backspace Key - Inconsistent Behavior

Post by CaliforniaJerry »

Maybe there's an option to change this behavior, so perhaps it's not a bug. However, here's the problem...

Version: WeBuilder 2010.0.0.108 Beta
OS: Microsoft Windows XP SP2

I'm editing a php file, but it shouldn't matter if it's css or html. The code is all properly lined up,

Code: Select all

<?php get_header(); ?>
	<div id="content_box">
		<div id="content" class="posts">
		<?php if (have_posts()) : ?>
			<?php /* If this is a category archive */ if (is_category()) { ?>
			<h2 class="archive_head">'<?php echo single_cat_title(); ?>'</h2>
			<?php } ?>
			<?php while (have_posts()) : the_post(); ?>
       etc...
If you take line (4) and add a couple [TAB] key spacings, that's fine. But now try to use the [Backspace] key. The editor erases ALL tabs you put in and even one or two more depending on the aligment of lines before and after. From my experience, the expected behavior is to erase only one tab spacing at a time. So if you entered four tab spacings, you should have to click the backspace key four times to return to the original alignment.
davenz

Re: Bug: TAB & Backspace Key - Inconsistent Behavior

Post by davenz »

Not confirmed here. I think this depends on whether you have 'Convert tabs to spaces' checked or not. I have, and have indent size = 2 and tab size = 4 (not sure of defaults as I may have played with these settings back in the day). Whatever, with the settings I have, I can tab say, four times; the backspace key steps back one space at a time. Not tab spaces as it would in Word, but a single character space back with each keypress. I can't emulate your behaviour by setting these options to any other settings so perhaps this has been changed in the version I am using.

Using 2010 build 10.0.2.118; Windows 7

Dave.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: Bug: TAB & Backspace Key - Inconsistent Behavior

Post by Karlis »

This behavior has been there as far as I remember the product. Backspace should bring you to the previous indent (indent of previous line).
Karlis Blumentals
Blumentals Software
www.blumentals.net
CaliforniaJerry
Posts: 88
Joined: Sat Aug 01, 2009 4:48 am
Location: Mountain View, CA
Contact:

Re: Bug: TAB & Backspace Key - Inconsistent Behavior

Post by CaliforniaJerry »

I would expect a backspace to return to the previous tab on the line. If you have five tabs and you press "Backspace", you would expect to move back to the fourth tab. Then the third, and so on. The current behavior acts as if it is overridden by a macro, not standard editor behavior as far as I can recall. If I press one too many tabs, and want to erase one, this makes it difficult.

<tab0> character <tab1><tab2><tab3> << Not affected

<tab0><Previous Line Indented here>
<tab0><tab1><tab2><tab3>character string... << This would be affected if you tried to backspace to <tab2>, you would instead be taken all the way back to <tab0>.
User avatar
Karlis
Site Admin
Posts: 3605
Joined: Mon Jul 15, 2002 5:24 pm
Location: Riga, Latvia, Europe
Contact:

Re: Bug: TAB & Backspace Key - Inconsistent Behavior

Post by Karlis »

This behavior is consistent with IDEs by Borland/CodeGear/Embarcadero (but not with Notepad++ and many other editors). I suppose it was programmed in the editor (which is mostly a third-party code) because it was considered an advantage.

I do not know how easy or difficult it would be to change this, but as I do not recall any complaints because of this particular behavior, I am kind of scared that a change like this might annoy our existing user base (including myself) which may consider this as an advantage or simply might be used to it. I would not like to introdice an option either because so far nobody has cared about this. But we shal keep the discussion open!
CaliforniaJerry wrote: <tab0><Previous Line Indented here>
<tab0><tab1><tab2><tab3>character string... << This would be affected if you tried to backspace to <tab2>, you would instead be taken all the way back to <tab0>.
Yes, I thought about this too, but then again "all the way back" would at most occasions be longer than 2 tabs. On the other hand people that work with spaces and have 4-space indent benefit from ability to quickly outdent instead of presisng backspace 4 times. So I believe it must be evaluated what happens more often - adding too many indent chars or wanting to unindent quickly.

So the discussion is open.
Karlis Blumentals
Blumentals Software
www.blumentals.net
Post Reply