aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmdline.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/cmdline.cpp b/cmdline.cpp
index 2f35c5d..db1d1ef 100644
--- a/cmdline.cpp
+++ b/cmdline.cpp
@@ -232,13 +232,19 @@ filename_complete(const gchar *filename, gchar completed)
file != NULL;
file = g_list_next(file)) {
GtkInfoPopupFileType type;
+ gboolean in_buffer = FALSE;
- type = filename_is_dir((gchar *)file->data)
- ? GTK_INFO_POPUP_DIRECTORY
- : GTK_INFO_POPUP_FILE;
+ if (filename_is_dir((gchar *)file->data)) {
+ type = GTK_INFO_POPUP_DIRECTORY;
+ } else {
+ type = GTK_INFO_POPUP_FILE;
+ /* FIXME: inefficient */
+ in_buffer = ring.find((gchar *)file->data)
+ != NULL;
+ }
gtk_info_popup_add_filename(filename_popup,
type, (gchar *)file->data,
- FALSE);
+ in_buffer);
}
gtk_widget_show(GTK_WIDGET(filename_popup));