qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs bufed.c html.c qe.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs bufed.c html.c qe.c
Date: Fri, 21 Dec 2007 12:20:18 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/21 12:20:18

Modified files:
        .              : bufed.c html.c qe.c 

Log message:
        fixed popup bug caused by readonly flag

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/bufed.c?cvsroot=qemacs&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/qemacs/html.c?cvsroot=qemacs&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.47&r2=1.48

Patches:
Index: bufed.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/bufed.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- bufed.c     6 Dec 2007 17:43:47 -0000       1.8
+++ bufed.c     21 Dec 2007 12:20:17 -0000      1.9
@@ -38,7 +38,7 @@
     EditBuffer *b, *b1;
     BufedState *hs;
     int last_index = list_get_pos(s);
-    int i;
+    int i, flags;
 
     hs = s->mode_data;
 
@@ -50,6 +50,8 @@
     
     /* build buffer */
     b = s->b;
+    flags = b->flags;
+    b->flags &= ~BF_READONLY;
     eb_delete(b, 0, b->total_size);
     for (i = 0; i < hs->items.nb_items; i++) {
         eb_printf(b, " %-20s", hs->items.items[i]->str);
@@ -60,6 +62,7 @@
         }
         eb_printf(b, "\n");
     }
+    b->flags = flags;
     s->offset = eb_goto_pos(s->b, last_index, 0);
 }
 

Index: html.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/html.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- html.c      21 Dec 2007 10:32:27 -0000      1.9
+++ html.c      21 Dec 2007 12:20:17 -0000      1.10
@@ -105,7 +105,9 @@
         b = eb_new(HTML_ERROR_BUFFER, BF_READONLY);
     if (!b)
         return;
+    b->flags &= ~BF_READONLY;
     eb_printf(b, "%s:%d: %s\n", basename(filename), line_num, msg);
+    b->flags |= ~BF_READONLY;
 }
 
 

Index: qe.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/qe.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- qe.c        21 Dec 2007 10:30:24 -0000      1.47
+++ qe.c        21 Dec 2007 12:20:18 -0000      1.48
@@ -4426,13 +4426,12 @@
                buffer */
             if (!completion_popup_window) {
                 EditBuffer *b;
-                b = eb_new("*completion*", BF_SYSTEM | BF_READONLY);
+                b = eb_new("*completion*", BF_SYSTEM);
                 w1 = qs->screen->width;
                 h1 = qs->screen->height - qs->status_height;
                 w = (w1 * 3) / 4;
                 h = (h1 * 3) / 4;
-                e = edit_new(b, (w1 - w) / 2, (h1 - h) / 2, w, h, 
-                             WF_POPUP);
+                e = edit_new(b, (w1 - w) / 2, (h1 - h) / 2, w, h, WF_POPUP);
                 /* set list mode */
                 do_set_mode(e, &list_mode, NULL);
                 do_refresh(e);
@@ -4443,12 +4442,14 @@
             EditBuffer *b = completion_popup_window->b;
             /* modify the list with the current matches */
             qsort(outputs, count, sizeof(StringItem *), completion_sort_func);
+            b->flags &= ~BF_READONLY;
             eb_delete(b, 0, b->total_size);
             for (i = 0; i < count; i++) {
                 eb_printf(b, " %s", outputs[i]->str);
                 if (i != count - 1)
                     eb_printf(b, "\n");
             }
+            b->flags |= BF_READONLY;
             completion_popup_window->mouse_force_highlight = 1;
             completion_popup_window->force_highlight = 0;
             completion_popup_window->offset = 0;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]