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

 
 

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

Submitter:  Marshall <marsian>
Submitted:  Tue 20 Jun 2017 05:42:39 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  lostbard
Originator Name:  Marsian Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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

Closing as fixed

John Donoghue <lostbard>
Group Member
Thu 06 Jul 2017 01:35:05 PM UTC, comment #4: 
John Donoghue <lostbard>
Group Member
Thu 29 Jun 2017 11:57:17 AM UTC, comment #3: 

And patch for default

(file #41069)

John Donoghue <lostbard>
Group Member
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>
Group Member
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>
Group Member
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 Files:
   
   
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
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by marsian (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-10 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2017-07-06 lostbard StatusPatch Submitted Ready For Test
    2017-06-29 lostbard Attached File- Added indentfix_dev.patch, #41069
    2017-06-28 lostbard Attached File- Added 51279.patch, #41059
        StatusConfirmed Patch Submitted
        Release4.2.1 dev
    2017-06-26 lostbard StatusNone Confirmed
        Assigned toNone lostbard

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code