Skip to content

Commit

Permalink
fix multiline output in floating windows
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelb committed Feb 8, 2022
1 parent 6802eb3 commit 6ab45c1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## v1.2.1
- F# support
- Fix multiline display in floating windows

## v1.2
- Live mode (a @ChristianChiarulli idea and partial realisation)
Expand Down
2 changes: 1 addition & 1 deletion 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 = "sniprun"
version = "1.2.0"
version = "1.2.1"
authors = ["michaelb <[email protected]>"]
edition = "2018"

Expand Down
6 changes: 3 additions & 3 deletions src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,16 +307,16 @@ pub fn display_floating_window(
"lua require\"sniprun.display\".fw_open({},{},\"{}\", true)",
row - 1,
col,
no_output_wrap(result, data, &DisplayType::TempFloatingWindow),
no_output_wrap(&result.to_string(), data, &DisplayType::TempFloatingWindow).replace("\n", "\\\n"),
)),
Err(result) => nvim.lock().unwrap().command(&format!(
"lua require\"sniprun.display\".fw_open({},{},\"{}\", false)",
row - 1,
col,
no_output_wrap(&result.to_string(), data, &DisplayType::TempFloatingWindow),
no_output_wrap(&result.to_string(), data, &DisplayType::TempFloatingWindow).replace("\n", "\\\n"),
)),
};
info!("disaply floating window res = {:?}", res);
info!("display floating window res = {:?}", res);
}

pub fn return_message_classic(
Expand Down

0 comments on commit 6ab45c1

Please sign in to comment.