Opened 11 years ago

Closed 11 years ago

#85 closed defect (fixed)

fix a bug (open many window for 1 file)

Reported by: fayland Owned by:
Priority: major Milestone:
Component: editor Version: 0.14
Keywords: Cc:



@@ -735,6 +735,16 @@

# current file otherwise open a new buffer and open the file there.
sub setup_editor {

my ($self, $file) = @_;

+ # before open it, please check if it's already opened.
+ # if yes, just focus that tab instead create a new one
+ my @pages = $self->pages;
+ foreach my $i ( 0 .. $#pages ) {
+ if ( $pages[$i]->{Document}->filename eq $file ) {
+ $self->on_nth_pane($i);
+ return;
+ }
+ }

local $self->{_no_refresh} = 1;

it works fine in my machine. mainly it prevents to open another tab for one opened file.

if you need a patch again your subversion or even I write it myself in your trunk, please ask me.


Change History (2)

comment:1 Changed 11 years ago by szabgab

i think this was already added in SVN trunk, please check that.

comment:2 Changed 11 years ago by fayland

  • Resolution set to fixed
  • Status changed from new to closed

oh, thanks. I'm a bit outdated

Note: See TracTickets for help on using tickets.