Page 1 of 1

Erratic indent behavior

Posted: Sun Sep 06, 2009 7:45 pm
by joewiz
Using oXygen XML Editor v10.3 on both XP and Mac OS X (10.6), I have been noticing erratic indent behavior. My settings are as follows:

Editor > Format
> Detect indent on open = off
> Indent with tabs = off
> Indent size = 4
> Hard line wrap = off
> Indent on enter = on
> Enable smart enter = on
> Detect line width on open = off
> Format and indent the document on open = off
> Line width = 140

But, often if I select some flush-left text and hit tab, the text only indents 1, 2, or sometimes 3 spaces - I've seen all cases. The only way I can get text to respect my 4-space setting is to de-indent a line, close the file, reopen it, and re-indent. If a line is already indented with two spaces, I can't get the line to indent with 4 spaces, even though I select the line, hit shift-tab to delete the indent, and hit tab again -- the 2-space indent returns; indenting again moves the line out to 6 spaces. I often see this 'sticky indent' behavior, where the indent levels of already-indented lines stick despite the settings in Editor > Format.

I haven't found a consistent way to reproduce the problem, but I do see it crop up on new .txt files after only a few cycles of reopening a file, de-indenting a line, and re-indenting; the indents start to appear at 1, 2, or 3 spaces instead of 4. I primarily work in .txt, .xml, and .xquery files.

Thanks in advance for any suggestions you might have. I'm happy to troubleshoot this further.

- Joe

Re: Erratic indent behavior

Posted: Sun Sep 06, 2009 8:19 pm
by joewiz
p.s. I'm using build 2009090215

Re: Erratic indent behavior

Posted: Mon Sep 07, 2009 11:35 am
by Mircea
Hello Joe,

Actually the situation you describe is not a bug.
Even if you are not using tabs for indentation - but spaces, the indentation adds the required number of spaces in the front of the selected text that will lead to the correct indent as if you were using tabs.
This means that in your case (tab size 4) by indenting to the right you will have the text starting from the next dividing by 4 column (0, 4, 8, 12, etc).

Best regards,
Mircea.

Re: Erratic indent behavior

Posted: Mon Sep 07, 2009 5:42 pm
by joewiz
Thanks for your reply, Mircea.

I agree that the behavior you describe is the correct behavior, but I'm afraid I wasn't very clear in describing the problem. Here are a few cases to illustrate what I'm seeing.

1. Open a new text file, hit tab and shift tab a few times. The cursor correctly moves from 1:1 to 1:5, indenting the text 4 spaces. Correct.

2. At 1:1, type "Hello". Select all and hit tab. Notice that Hello begins at 1:4, so the text is only indented 3 spaces. Wrong.

3. Select all and hit tab again. Now Hello begins at 1:8, so the text is indented 4 more spaces, or 7 spaces total. Wrong.

Do you see this too?

Thanks,
Joe

Re: Erratic indent behavior

Posted: Tue Sep 08, 2009 10:01 am
by Mircea
Hello Joe,

The case you described is correct when you have a selection, and the caret is at the end of that selection.
Thank you for reporting this. We will fix it and the fix will be available in the next maintenance build.

Regards,
Mircea.

Re: Erratic indent behavior

Posted: Tue Sep 08, 2009 2:33 pm
by joewiz
Great, thank you so much! I appreciate your quick replies.

Re: Erratic indent behavior

Posted: Tue Oct 06, 2009 4:54 pm
by joewiz
Mircea,

I don't suppose you would have an estimate as to when the next maintenance update might be? I'm just trying to schedule the next batch of software updates I'll be asking our IT folks to carry out, and I want to make sure this is included, if possible.

Many thanks,
Joe

Re: Erratic indent behavior

Posted: Tue Oct 06, 2009 4:58 pm
by sorin_ristache
Hello,

The next version of Oxygen is version 11.0 and it will be released in this month.


Regards,
Sorin

Re: Erratic indent behavior

Posted: Tue Oct 06, 2009 5:07 pm
by joewiz
sorin wrote:Hello,

The next version of Oxygen is version 11.0 and it will be released in this month.


Regards,
Sorin
Thanks, Sorin. A licensing question: Mircea's e-mail had said this fix would be included in a maintenance update, which I understood to mean an update covered by the Support & Maintenance Pack. I'm still covered by the Support & Maintenance Pack, so will 11 be a free update for me?

Re: Erratic indent behavior

Posted: Wed Oct 07, 2009 9:48 am
by sorin_ristache
You can download a build of Oxygen 10.3 that includes a fix for the indent problem from here for Windows and from here for Mac OS X.


Regards,
Sorin

Re: Erratic indent behavior

Posted: Wed Oct 07, 2009 2:29 pm
by joewiz
Thank you so much, Sorin! I just tried the OS X build, and it fixes the problem.