Skip to content

Commit aab41bb

Browse files
authored
Do not execute pending command when directory changes (#417)
* Do not execute pending command when directory changes * nemo-terminal: do not restore old command after changing directory if input is empty Co-authored-by: Vinícius <[email protected]>
1 parent d763668 commit aab41bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nemo-terminal/src/nemo_terminal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def change_directory(self, uri):
252252

253253
# Restore user input
254254
restorelinekeys = settings.get_string("terminal-restore-line")
255-
self.feed_child(restorelinekeys.encode().decode("unicode_escape") + "\n")
255+
self.feed_child(restorelinekeys.encode().decode("unicode_escape"))
256256
#self.feed_child(restorelinekeys + "\n")
257257

258258
def get_widget(self):

nemo-terminal/src/org.nemo.extensions.nemo-terminal.gschema.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@
5959
</key>
6060

6161
<key name="terminal-erase-line" type="s">
62-
<default>"\\x05\\x15"</default>
62+
<default>" \\x05\\x15"</default>
6363
<summary>Erase line key sequence</summary>
6464
<description>Key sequence to safely erase the current line in the terminal. Should be escaped according to Python rules. Use \xhh for non-printing characters, where hh is the hex value (including any leading zeroes) of the ASCII character. Default values are valid for Bash.</description>
6565
</key>
6666

6767
<key name="terminal-restore-line" type="s">
68-
<default>"\\x19"</default>
68+
<default>"\\x19\\x08"</default>
6969
<summary>Restore line key sequence</summary>
7070
<description>Key sequence to restore the line erased by the erase line sequence. Use \xhh for non-printing characters, where hh is the hex value (including any leading zeroes) of the ASCII character. Default values are valid for Bash.</description>
7171
</key>
7272

7373
<key name="terminal-change-directory-command" type="s">
74-
<default>" cd %s &amp;&amp; tput cuu1 &amp;&amp; tput el"</default>
74+
<default>" cd %s &amp;&amp; tput cuu1 &amp;&amp; tput el &amp;&amp; tput cuu1"</default>
7575
<summary>Change directory command</summary>
7676
<description>The command used by the terminal to change directory. %s is replaced by the shell-quoted directory name in the shell. This command will have a new line appended.</description>
7777
</key>

0 commit comments

Comments
 (0)