[PATCH 1/2] Window save functionality

Lubomir I. Ivanov neolit123 at gmail.com
Sat Mar 2 06:45:26 PST 2013


On 2 March 2013 12:30, Robert C. Helling <helling at atdotde.de> wrote:
>
> On Mar 2, 2013, at 7:45 AM, Dirk Hohndel wrote:
>
> Dirk,
>
>> Right now when I switch to one of the single pane modes (ctrl-1/2/3) and
>> then back to the three pane mode, I'm back to the default
>> positions. Similarly if I quit while in one of the single pane modes.
>>
>> Instead it would be much nicer when switching to single pane mode it
>> would remember the positions of the panes and then restore them the next
>> time it's in three pane mode (either Ctrl-4 or a restart of the app)
>>
>> Does that make sense?
>
> it does make sense and I was aware of that already last night when I sent the second patch. But I was not able to come up with a solution that would not use new global variables (secret_pane_position) at that time of day. Now, after some hours of sleep, here is my attempt.
>
> Signed-off-by: Robert C. Helling <helling at atdotde.de>
>
> Robert
>
> PS: Two more questions: How do I set the commit message when sending a patch?
>
> And I keep having formatting problems. I am aware of https://www.kernel.org/doc/Documentation/CodingStyle
> but I have not been able to convince my emacs (which is actually an Aquamacs on Mac) to follow it even with the suggested .emacs file and the BSD indent on Mac doesn't know the -kr option to follow the masters. Any suggestion?
>

robert, your previous patch (which is in master) introduced some
spaces instead of real tabs for indentation. this new patch also has
them, but i think your logic for saving the selected view seems
correct. only has to be tested some more...

this blog post might help you about the required (from emacs) formatting:
http://martinezjavier.blogspot.com/2011/07/emacs-configuration-for-linux-kernel.html

i'm personally not an user emacs or vim, so cannot really help much in
details there, but this should set the correct indentation for emacs:
(setq c-default-style "linux")

lubomir
--


More information about the subsurface mailing list