Selaa lähdekoodia

fix(gtk): enable kill-buffer command in minibuffer

Added the missing handling for Mode::KillBuffer in GtkEditor::on_key_pressed, allowing users to actually kill buffers when prompted.
Bernardo Magri 1 kuukausi sitten
vanhempi
sitoutus
eb0732ceb1
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      src/gtk_editor.cpp

+ 3 - 0
src/gtk_editor.cpp

@@ -849,6 +849,9 @@ protected:
                 } else if (mode_ == Mode::BufferSwitch) {
                     if (core_->switch_buffer_in_window(command_buffer_)) message_line_ = "Switched";
                     else message_line_ = "Buffer not found";
+                } else if (mode_ == Mode::KillBuffer) {
+                    if (core_->close_buffer(command_buffer_)) message_line_ = "Killed buffer";
+                    else message_line_ = "Buffer not found";
                 }
 
                 mode_ = Mode::Normal;