Skip to content

Commit 4f7eb19

Browse files
committed
Update cursive
1 parent 0b6118f commit 4f7eb19

File tree

5 files changed

+116
-19
lines changed

5 files changed

+116
-19
lines changed

Cargo.lock

Lines changed: 109 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ tls = ["clickhouse-rs/tls-rustls"]
2424
tokio-console = ["dep:console-subscriber", "tokio/tracing"]
2525

2626
[patch.crates-io]
27-
cursive = { git = "https://github.com/azat-rust/cursive", branch = "chdig-25.7" }
28-
cursive_core = { git = "https://github.com/azat-rust/cursive", branch = "chdig-25.7" }
27+
cursive = { git = "https://github.com/azat-rust/cursive", branch = "chdig-next" }
28+
cursive_core = { git = "https://github.com/azat-rust/cursive", branch = "chdig-next" }
2929

3030
[dependencies]
3131
# Basic

src/interpreter/worker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ async fn start_tokio(context: ContextArc, receiver: ReceiverArc) {
289289
cb_sink
290290
.send(Box::new(move |siv: &mut cursive::Cursive| {
291291
if need_clear {
292-
siv.clear();
292+
siv.complete_clear();
293293
}
294294
siv.on_event(cursive::event::Event::Refresh);
295295
}))

src/view/providers/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl ViewProvider for ClientViewProvider {
8686
Ok(status) => {
8787
cb_sink
8888
.send(Box::new(move |siv| {
89-
siv.clear();
89+
siv.complete_clear();
9090
if !status.success() {
9191
siv.add_layer(Dialog::info(format!(
9292
"clickhouse client exited with status: {}\n\nCommand: {}",
@@ -98,7 +98,7 @@ impl ViewProvider for ClientViewProvider {
9898
}
9999
Err(err) => {
100100
cb_sink.send(Box::new(move |siv| {
101-
siv.clear();
101+
siv.complete_clear();
102102
siv.add_layer(Dialog::info(format!(
103103
"Failed to spawn clickhouse client: {}\n\nCommand: {}\n\nMake sure clickhouse is installed and in PATH",
104104
err, cmd_line
@@ -116,7 +116,7 @@ impl ViewProvider for ClientViewProvider {
116116
.unwrap();
117117

118118
// Force a full redraw of the screen
119-
siv.clear();
119+
siv.complete_clear();
120120

121121
log::info!("Client terminated. Raw mode and mouse capture enabled.");
122122
}

src/view/queries_view.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ impl QueriesView {
527527
.send(true, WorkerEvent::ExecuteQuery(database, query));
528528

529529
Ok(Some(EventResult::Consumed(Some(Callback::from_fn_once(
530-
|siv| siv.clear(),
530+
|siv| siv.complete_clear(),
531531
)))))
532532
}
533533

0 commit comments

Comments
 (0)