Skip to content

Commit

Permalink
Merge pull request kyoheiu#277 from kyoheiu/develop
Browse files Browse the repository at this point in the history
v2.12.1
  • Loading branch information
kyoheiu authored Feb 3, 2024
2 parents 7296e1e + 85bad8e commit 2acf98b
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 18 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## Unreleased

## v2.12.1 (2024-02-04)

### Fixed

- Restore the cursor position properly after exit in a tmux (and possibly in other multiplexers) session.

## v2.12.0 (2024-01-28)

### Added
Expand Down
38 changes: 23 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "felix"
version = "2.12.0"
version = "2.12.1"
authors = ["Kyohei Uto <[email protected]>"]
edition = "2021"
description = "tui file manager with vim-like key mapping"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ For more detailed document, visit https://kyoheiu.dev/felix.

## New release

## v2.12.1 (2024-02-04)

### Fixed

- Restore the cursor position properly after exit in a tmux (and possibly in other multiplexers) session.

## v2.12.0 (2024-01-28)

### Added
Expand Down
5 changes: 3 additions & 2 deletions src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::session::*;
use super::state::*;
use super::term::*;

use crossterm::cursor::RestorePosition;
use crossterm::cursor::{RestorePosition, SavePosition};
use crossterm::event::{self, Event, KeyCode, KeyEvent, KeyEventKind, KeyModifiers};
use crossterm::execute;
use crossterm::terminal::{EnterAlternateScreen, LeaveAlternateScreen};
Expand Down Expand Up @@ -153,8 +153,9 @@ pub fn run(arg: PathBuf, log: bool) -> Result<(), FxError> {

/// Run the app. (Containing the main loop)
fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
//Enter the alternate screen with crossterm
//Save the current cursor position and enter the alternate screen with crossterm
let mut screen = stdout();
write!(screen, "{}", SavePosition)?;
enter_raw_mode();
execute!(screen, EnterAlternateScreen)?;

Expand Down

0 comments on commit 2acf98b

Please sign in to comment.