Skip to content

Commit

Permalink
fix: tmux clear scrollback setting not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardroche committed Jan 23, 2024
1 parent 5a8b289 commit 662827e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## 3.19.1 - 2024-01-23

### Fixed

- Tmux strategy `phpunit.tmux_clear_scrollback` setting is not working correctly

## 3.19.0 - 2024-01-22

### Added
Expand Down
5 changes: 3 additions & 2 deletions Preferences.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@
// Clear the terminal screen before running tests.
"phpunit.tmux_clear": true,

// Clear the terminal's scrollback buffer using the extended "E3" capability.
"phpunit.tmux_clear_scrollback": false,
// Clear the terminal's scrollback buffer or do not attempt to clear it
// using the extended "E3" capability.
"phpunit.tmux_clear_scrollback": true,

// Specify the session, window, and pane which should be used to run tests.
//
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Configure Tmux settings for running tests in a tmux pane:
| Setting | Type | Default | Description
| :-------------------------------- | :------------ | :-------- | :----------
| `phpunit.tmux_clear` | `bool` | `true` | Clear the terminal screen before running tests.
| `phpunit.tmux_clear_scrollback` | `bool` | `false` | Clear the terminal's scrollback buffer using the extended "E3" capability.
| `phpunit.tmux_clear_scrollback` | `bool` | `true` | Clear the terminal's scrollback buffer or do not attempt to clear it using the extended "E3" capability.
| `phpunit.tmux_target` | `string` | `:.` | Specify the session, window, and pane which should be used to run tests. <br><br>Format: `{session}:{window}.{pane}` <br><br>The default means the current pane. <br><br>For example, `:{start}.{top}` would mean the current session, lowest-numbered window, top pane. <br><br>See [Tmux documentation](http://man.openbsd.org/OpenBSD-current/man1/tmux.1#COMMANDS) for target usage.

### CLI Options
Expand Down
2 changes: 1 addition & 1 deletion lib/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def build_tmux_cmd(view, working_dir: str, cmd: list) -> list:
# Clear the terminal screen.
if get_setting(view, 'tmux_clear'):
clear_cmd = ['clear']
if get_setting(view, 'tmux_clear_scrollback'):
if not get_setting(view, 'tmux_clear_scrollback'):
clear_cmd.append('-x')
key_cmds.append(shlex.join(clear_cmd))

Expand Down

0 comments on commit 662827e

Please sign in to comment.