bugGNU Octave - Bugs: bug #47529, The editor doesn't close the...

 
 

bug #47529: The editor doesn't close the initial unnamed tab

Submitter:  Lachlan Andrew <lachlan>
Submitted:  Fri 25 Mar 2016 06:27:56 AM UTC
   
 
Category:  GUI Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  lachlan
Originator Name:  Lachlan Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 31 Mar 2016 12:10:13 AM UTC, comment #3: 

Pushed to the default branch (very minor word wrapping on the commit message):

http://hg.savannah.gnu.org/hgweb/octave/rev/08baf0ebc9a9

Mike Miller <mtmiller>
Group Member
Sat 26 Mar 2016 08:52:03 AM UTC, comment #2: 

Thanks, Mike.  Here is the changeset with revised commit message.

The behaviour when running "edit" multiple times was purely a side effect that (I thought!) I saw and wanted to warn of.  I'd prefer to leave it, if that is OK with you.

(file #36765)

Lachlan Andrew <lachlan>
Fri 25 Mar 2016 06:17:40 PM UTC, comment #1: 

This patch does do as originally stated, but not the side effect you describe.

The editor still opens the "unnamed" window if no files have been edited. If I "edit ls", then ls.m is opened in a tab which replaces the unnamed file (if unmodified). This is a nice improvement.

But if I run "edit" multiple times in the command window I still get multiple unnamed files in tabs in the editor panel. I don't know if that's something you want to change as part of this patch also, or leave it as is for now.


For your changeset summary, can you amend to add the bug #? And please also include the class names when you are mentioning functions in the changeset. For example your summary should mention


* file-editor.cc (file_editor::request_open_file): Check for ...


instead of


* file-editor.cc (request_open_file): Check for ...


Mike Miller <mtmiller>
Group Member
Fri 25 Mar 2016 06:27:56 AM UTC, original submission:  

If the editor pane is made visible before the first file-open request (such as if the last session ended with the editor undocked), then it opens a tab for an empty unnamed file.

That is good, but some applications replace that empty tab with the first file to be opened (unless the unnamed tab has been modified).

The attached patch achieves that in Octave.

As a side effect, typing


edit ""
edit ""


will only open one unnamed file, instead of two.

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 #36758:  close_unnamed.cset added by lachlan (2KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2016-03-31 mtmiller StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-03-26 lachlan Attached File- Added bug_47529_close_unnamed.cset, #36765
    2016-03-25 lachlan Attached File- Added close_unnamed.cset, #36758

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code