bugGNU Octave - Bugs: bug #51279, Auto-indent with 'use tabs' option...

 
 

bug #51279: Auto-indent with 'use tabs' option jumps cursor to wrong position

Submitted by:  Marshall <marsian>
Submitted on:  Tue 20 Jun 2017 05:42:39 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: John Donoghue <lostbard>
Originator Name: MarsianOpen/Closed: Closed
Release: devOperating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 10 Jul 2017 02:35:37 PM UTC, comment #5:

Closing as fixed

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 06 Jul 2017 01:35:05 PM UTC, comment #4:

Pushed http://hg.savannah.gnu.org/hgweb/octave/rev/6798f5e5c58e

John Donoghue <lostbard>
Project MemberIn charge of this item.
Thu 29 Jun 2017 11:57:17 AM UTC, comment #3:

And patch for default

(file #41069)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Wed 28 Jun 2017 02:38:06 PM UTC, comment #2:

Issue appears to be in the autoident code in octave, in windows where lines may have a \r\n at then end.

Patch attached that works for me (stable octave). If change is good, I will have to create another one for default as the indent function has changed files.

(file #41059)

John Donoghue <lostbard>
Project MemberIn charge of this item.
Mon 26 Jun 2017 07:47:29 PM UTC, comment #1:

I see the same behavior.

For 2 at least, its an issue with the fold code which makes it an issue with scintilla.

I'm looking at it and what causes 1.

John Donoghue <lostbard>
Project MemberIn charge of this item.
Tue 20 Jun 2017 05:42:39 PM UTC, original submission:

In the GUI editor, Windows 10, I have the following problems with auto-indent:
1) When auto indent or unindent is triggered when there are lines after it, then the cursor is jumping to the middle of the next non-whitespace line (after inserting the proper newline and indentation). Then I have to move the cursor back to the right location before continuing to type.

2) A space seems to be required on the control statement in order to trigger auto indent/unindent. So 'for', and 'if' are triggered normally, but not for 'do' or 'end' statements unless a space is purposefully put after it. (I thought un-indent just wasn't implemented until I discovered the space after makes it work).

I have the following possibly related options:
Auto indentation, indentation uses tabs. I thought 'show completion list automatically' might be affecting it, but the behavior is the same if the list is showing or not. Disabling 'auto-indentation uses tabs' fixes the cursor jumping to the wrong position problem (problem 1), except I want that option. It doesn't fix the problem of the required space in the line to enable the auto-indent trigger (problem 2).

Marshall <marsian>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #41069:  indentfix_dev.patch added by lostbard (2KiB - application/octet-stream)
file #41059:  51279.patch added by lostbard (2KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by lostbard (Posted a comment)
  • -unavailable- added by marsian (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 Jul 2017 02:35:37 PM UTClostbardStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 06 Jul 2017 01:35:05 PM UTClostbardStatusPatch Submitted=>Ready For Test
    Thu 29 Jun 2017 11:57:17 AM UTClostbardAttached File-=>Added indentfix_dev.patch, #41069
    Wed 28 Jun 2017 02:38:06 PM UTClostbardAttached File-=>Added 51279.patch, #41059
      StatusConfirmed=>Patch Submitted
      Release4.2.1=>dev
    Mon 26 Jun 2017 07:47:29 PM UTClostbardStatusNone=>Confirmed
      Assigned toNone=>lostbard

    Back to the top


    Powered by Savane 3.1-cleanup1