Re: [gedit-list] Enhancement requested



Il giorno sab, 24/09/2005 alle 01.28 -0700, Jerry DeLisle ha scritto:
> Paolo Borelli wrote:
> 
> > > 
> >> When I reopen a file in gvim, it remembers where I was at in the last
> >> session and that is where it opens into the file.  That is very
> >> valuable.  Like I said, when I am working multiple source files, it
> >> helps to remember where I left off automatically.
> >>  
> >> As far as I know, gedit does not do this.  When I reopen a file, its
> >> always at the top, looking at the familiar gnu license stuff.  (I do
> >> development and testing for gfortran in my spare time).
> >>  
> 
> 
> >Actually we implemented this, but we ended up disabling that for a
> >couple of reasons:
> >1 - it wasn't working properly  :) 
> >2 - enabling it incoditionally was confusing some of our users
> >
> >I'm pretty confident that 1) is now fixed since we fixed "gedit +10 foo"
> >which opens a file and moves to line 10 and which uses the same code
> >path.
> >About 2) we should probably try again or at least add a GConf toggle for
> >it.
> 
> > For now you can enable the feature by grabbing the source, editing
> > gedit-document.c in the function gedit_document_real_loaded and enabling
> > the bit of code that is currently commented out. Then compile and
> > install.
> > 
> >
> 
> Hi All,
> 
> I finally was able to get gedit to compile.  I did the above suggested change 
> and see no change of behavior.
> 
> Any further suggestions?
> 

You are totally right, I should have tested that before replying you.

To get it to work you also need to comment out the following two lines
in the open_files_done function in gedit-file.c

//	if (first_document != NULL)
//		gedit_document_goto_line (first_document, MAX (0, line - 1));


Obviously this is a hack, not a proper soloution, but it should do the
trick for now.

Fortunately all this code has been rewritten in much more sane way in
the new_mdi cvs branch[1] that is under developement and we'll implement
it without hackish workarounds.

Lemme know if it works

ciao
	Paolo


[1]: you can read about it here: http://live.gnome.org/Gedit_2fNewMdi




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]