Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sublime Text Remembering Layout Changes With Hot_Exit : False #1477

Closed
1 of 3 tasks
tylazarus opened this issue Nov 1, 2016 · 6 comments
Closed
1 of 3 tasks

Sublime Text Remembering Layout Changes With Hot_Exit : False #1477

tylazarus opened this issue Nov 1, 2016 · 6 comments
Assignees
Labels
Milestone

Comments

@tylazarus
Copy link

Summary

If hot_exit : false is set in user preferences, and view -> layout -> 2 (or greater) columns is chosen for a file, closing and reopening results in new files with a multi-column layout. This may have been an issue for some time, but I am only noticing it now since the settings change to display both default and user settings side by side in one window.

Expected behavior

With hot_exit : false, closing and reopening Sublime Text would result in the default layout. If Sublime Text is not remembering open files/tabs, I don't expect it to remember layout changes.

Actual behavior

Layout changes are remembered across sessions.

Steps to reproduce

  1. Open Sublime Text
  2. Open Settings. New 2 column window is created with default settings and user specific settings side by side.
  3. Set hot_exit : false
  4. DO NOT close the open settings window. Close Sublime Text.
  5. Reopen Sublime Text. Empty File is created with 2 columns showing.

NOTE: if you close the 2 column window before closing Sublime Text, it will behave as expected and open a new file at launch with one column.

Environment

  • Operating system and version:
    • Windows ...
    • Mac OS 10.12.1
    • Linux ...
  • Sublime Text:
    • Build 3126
@keith-hall
Copy link
Collaborator

You could just write a plugin to change the layout to single for you when it loads:

import sublime
import sublime_plugin

def plugin_loaded():
    sublime.active_window().run_command('set_layout', {"cells": [[0, 0, 1, 1]], "cols": [0.0, 1.0], "rows": [0.0, 1.0]})

@tylazarus
Copy link
Author

Thanks Keith! I've never written a plugin before, but I just tried your example and it worked. My only issue with it is that ST3 opens to the split layout, then executes the plugin and resets the layout. There is a noticeable delay during which the split layout is still visible. Minor, I know. I'm still curious if hot_exit not resetting the window layout is a bug or intended behavior.

@keith-hall
Copy link
Collaborator

I would guess that it is intended, simply because the workflow for deliberately, permanently changing the layout with hot_exit disabled would be cumbersome if ST reset the layout to single mode each time it was closed completely.

The same thing annoys me even with hot_exit enabled - I just have to remember to close the settings window first ;) related: #1402

@tylazarus
Copy link
Author

Guess I will try to remember to close the settings window first :)

@deathaxe
Copy link
Collaborator

I also experienced some layout issues with hot_exit:false.

  1. If 2 column layout is active, when closeing Sublime Text the right panel keeps black on the next start.
    screen
    One needs to click into the 2nd column view to trigger a repaint. This issue exists as long as I use Sublime Text 3.
  2. Sometimes the 2nd column even automatically closes without any reason after a second or two, just as I had keith-hall's suggested plugin from above installed, but I do not have.
  3. Considder Sublime Text showing only one window with SubliMerge comparing 2 files. Close Sublime Text and reopen it, will also result in 2 column layout with the 2nd black view for a couble of seconds. Than the whole window is closed and recreated with only one empty column. In the meanwhile Sublime Text is unresponsive. All open files are closed, then.

Sublime Text 3126 x64 portable
OS: Windows 10 x64

@BenjaminSchaaf
Copy link
Member

Fixed in build 4114. The remember_layout setting controls this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants