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

[bug-760] working directory feature is broken #804

Conversation

vssdeo
Copy link
Contributor

@vssdeo vssdeo commented Aug 6, 2023

Issue Ref: #760

- as per the bug the layout does not get updated when "Save" button in layout is pressed
- it does get updated if the window is closed by pressing top x close icon.
- on pressing Save, it seems that the prefseditor takes this from current_layout = terminator.describe_layout() and saves it in config
- whereas the current changes are done per key stroke and config is updated
- this patch copies the parameters like directory and command when Save is press and on_layoutrefreshbutton_clicked() is called
- Hence working dir and command are copied when Save is pressed using uuid to match terminals.
- If there is a command registered then the terminal runs the command and exits. so one is not able to see the results.

Observation

It was reported in bug that this used to work in previous versions, but I could not find that for me it only worked after the patch.

command in layout issue:

I have notices in the released version 2.1.3 and in the master branch I was working that if a command is present the terminator exits after being launched. I could trace it to terminal.py in following lines. I am not sure if thats the default behavior but it seemed confusing when program exited.

elif self.config['exit_action'] in ('close', 'left'):
self.cnxids.new(self.vte, 'child-exited',
lambda x, y: self.emit('close-term'))

Testing

  • Launch terminator

  • Right-click and Preferences->Layout

  • Try changing working directory and press Save below.

  • exit terminator and relaunch

  • the previous state would be same unmodified

  • after this patch that should work

…n layout is pressed

- it does get updated if the window is closed by pressing top x close icon.
- on pressing Save, it seems that the prefseditor takes this from current_layout = terminator.describe_layout() and saves it in config
- whereas the current changes are done per key stroke and config is updated
- this patch copies the parameters like directory and command when Save is press and on_layoutrefreshbutton_clicked() is called
- Hence working dir and command are copied when Save is pressed using uuid to match terminals.
- If there is a command registered then the terminal runs the command and exits. so one is not able to see the results.
@vssdeo
Copy link
Contributor Author

vssdeo commented Aug 26, 2023

Note: issue #760 update by the reporter notes that, it does not work for him though the update of directory and command is done, I am following up on that

@vssdeo
Copy link
Contributor Author

vssdeo commented Sep 15, 2023

Let's wait for this one, cross-checking all conditions

- directory was not getting expanded for ~ to user dir while changing path
-added home dir ~ expansion to UI in prefs also
@mattrose
Copy link
Member

mattrose commented Feb 5, 2024

@vssdeo I'm getting an error when I'm trying to merge this:


git checkout -b vssdeo-760-working-directory-feature-is-broken master
git pull https://github.com/vssdeo/terminator.git 760-working-directory-feature-is-broken
Switched to a new branch 'vssdeo-760-working-directory-feature-is-broken'
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 13 (delta 8), reused 10 (delta 8), pack-reused 0
Unpacking objects: 100% (13/13), 17.90 KiB | 1.12 MiB/s, done.
From https://github.com/vssdeo/terminator
 * branch              760-working-directory-feature-is-broken -> FETCH_HEAD
Auto-merging terminatorlib/config.py
Auto-merging terminatorlib/plugins/mousefree_url_handler.py
CONFLICT (add/add): Merge conflict in terminatorlib/plugins/mousefree_url_handler.py
Auto-merging terminatorlib/prefseditor.py
error: could not apply 0ae2aba1... 1) Mouse less/free opening / yanking feature
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 0ae2aba1... 1) Mouse less/free opening / yanking feature 2) plugin_util  file to assist this and other plugins with key-press Helper function 3) adding Key Binding Help Functions in above (2) to config and preferences->keybinding to have a consistent behavior

Can you fix this up so that it can be merged again?

@mattrose mattrose added the question Further information is requested label Feb 5, 2024
@vssdeo
Copy link
Contributor Author

vssdeo commented Feb 5, 2024

@mattrose I have fixed it and opened a new pull request since old one I closed by mistake. Ref: #882

@vssdeo vssdeo closed this Feb 5, 2024
@vssdeo vssdeo deleted the 760-working-directory-feature-is-broken branch February 5, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants