bugGNU Octave - Bugs: bug #47414, Folding editor text breaks cursor...

 
 

bug #47414: Folding editor text breaks cursor movement

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Tue 15 Mar 2016 09:22:15 AM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lachlan
Originator Name:  Lachlan Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 25 Jul 2016 11:26:21 PM UTC, comment #5: 

I pushed the changeset here:

http://hg.savannah.gnu.org/hgweb/octave/rev/30a0756e6318

Closing report.

Thanks!

John W. Eaton <jwe>
Group administrator
Fri 22 Jul 2016 09:13:45 PM UTC, comment #4: 

I've tried this patch for some months now and it works fine AFAICS. Can this be pushed?

Philip Nienhuis <philipnienhuis>
Group Member
Wed 13 Apr 2016 08:22:09 PM UTC, comment #3: 

Lachlan,

That last sentence / suggestion was of course a little joke. But I think you knew didn't you.

I'd say -more seriously-: please let's fix the important things and ignore too much eye-candy.
I think TMW does maintain a good balance there: they implement a lot of small features that really aid users, like pop-up variable values if a cursor is over a variable name; same for function input arguments when the cursor is over a function name; m-file parsing and indicating suspicious and wrong lines in the rightmost editor column; etc.

A thing that quite negatively but consistently (un)impresses my co-workers is Octave's relatively slow graphics speed for esp. patches and surfaces.


For suggestions like you give there's a task tracker. Unfortunately it isn't often used.


BTW this bug report did help to assess that on Mageia some things don't work (properly): undocked panes have no minimize buttons (already known and confirmed by Rik) and I noted at last that the editor does not portray those folding symbols in the 3rd column at all.
So I could only test on Windows.

Philip Nienhuis <philipnienhuis>
Group Member
Wed 13 Apr 2016 12:40:10 AM UTC, comment #2: 

Philip, thanks for confirming the bug and that the patch fixes it.

If you are looking for cool features to convince your colleagues that Octave is not just copying Matlab, I can try to write a re-folding patch.  It would probably involve more code (=maintenance) than is justified, but I could try to write a quick-and-dirty patch that you could use for demonstration.

Off topic: I wrote a post to Octave Maintainers, which doesn't seem to have appeared, suggesting that we compile a prioritised list of things like this to make the Octave "user experience" better than Matlab's.  For the language itself, I think that sufficiently many users want to run their code on Matlab as well that improvements to the language aren't a strong selling point -- even such amazingly useful things as += and ++ that TMW really should implement.

Lachlan Andrew <lachlan>
Tue 12 Apr 2016 06:57:27 PM UTC, comment #1: 

Confirmed.

I tested  your patched on Windows 7; I find that the cursor does properly enter e.g. an if block but gets hidden and the editor scrolls up (apparently the number of lines corresponding to e.g., ignored else(if) clauses and comment lines) with each dbstep command (w/o unfolding).
Once past a folded block the cursor reappears.
It is only that the if block doesn't unfold to show the current line.

To me this is a bug rather than a feature request as the cursor can in the end scroll out of sight (out of the visible editor pane) with unspecified consequences.

Indeed your patch fixes this.

(One might argue that once past the previously folded block it should fold back in again but that would be too smooth.... ;-) )

Philip Nienhuis <philipnienhuis>
Group Member
Tue 15 Mar 2016 09:22:15 AM UTC, original submission:  

When text is "folded" by clicking on the "-" boxes in the GUI editor, the cursor is sent to the wrong position by things like stopping at breakpoints, dbstep, and "goto" by ^G.  Instead of going to line X of the document, it goes to "visible" line X.

Moreover, going to a line that has been folded doesn't unfold that line.

To see the problem, load the attached "fold_problem.m", fold all of the loops, then type ^G 10 <enter>.

The attached changeset fixes this.

Lachlan Andrew <lachlan>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #36644:  folded_goto.cset added by lachlan (2KiB - text/x-diff)
file #36645:  fold_problem.m added by lachlan (2KiB - d2l/unknowntype)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by philipnienhuis
  • -email is unavailable- added by lachlan (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 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-25 jwe StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-04-17 philipnienhuis Carbon-Copy- Added philipnienhuis
    2016-04-12 philipnienhuis Item GroupFeature Request Incorrect Result
        Operating SystemGNU/Linux Any
    2016-03-15 lachlan Attached File- Added folded_goto.cset, #36644
        Attached File- Added fold_problem.m, #36645

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code