Mercurial > vim
comparison src/gui_gtk.c @ 13119:729f279fda8d v8.0.1434
patch 8.0.1434: GTK: :promtfind does not put focus on text input
commit https://github.com/vim/vim/commit/d7823d5b7c32f73ca720373ea9c16b1b47f086df
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 28 15:36:42 2018 +0100
patch 8.0.1434: GTK: :promtfind does not put focus on text input
Problem: GTK: :promtfind does not put focus on text input. (Adam Novak)
Solution: When re-opening the dialog put focus on the text input. (Kazunobu
Kuriyama, closes #2563)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 28 Jan 2018 15:45:05 +0100 |
parents | 3ca08bf99396 |
children | 2ede8acf65dc |
comparison
equal
deleted
inserted
replaced
13118:d2720676b789 | 13119:729f279fda8d |
---|---|
2191 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(frdp->mcase), | 2191 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(frdp->mcase), |
2192 (gboolean)mcase); | 2192 (gboolean)mcase); |
2193 #endif | 2193 #endif |
2194 } | 2194 } |
2195 gtk_window_present(GTK_WINDOW(frdp->dialog)); | 2195 gtk_window_present(GTK_WINDOW(frdp->dialog)); |
2196 | |
2197 /* For :promptfind dialog, always give keyboard focus to 'what' entry. | |
2198 * For :promptrepl dialog, give it to 'with' entry if 'what' has an | |
2199 * non-empty entry; otherwise, to 'what' entry. */ | |
2200 gtk_widget_grab_focus(frdp->what); | |
2201 if (do_replace && gtk_entry_get_text_length(GTK_ENTRY(frdp->what))) | |
2202 gtk_widget_grab_focus(frdp->with); | |
2203 | |
2204 | |
2196 vim_free(entry_text); | 2205 vim_free(entry_text); |
2197 return; | 2206 return; |
2198 } | 2207 } |
2199 | 2208 |
2200 frdp->dialog = gtk_dialog_new(); | 2209 frdp->dialog = gtk_dialog_new(); |