emacs-diffs
[Top][All Lists]
Advanced

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

master 9509113 1/5: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 9509113 1/5: Merge from origin/emacs-27
Date: Sat, 10 Oct 2020 10:55:07 -0400 (EDT)

branch: master
commit 950911373c7e3a7527748b377935f4bfff694fe8
Merge: 1006eb1 acc9b46
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Merge from origin/emacs-27
    
    acc9b46153 Fix merging of region face for non-ASCII characters
    c2a13969e4 Make drag and drop on NS open all URLs (bug#43470)
---
 lisp/term/ns-win.el | 12 +++---------
 src/xdisp.c         |  7 ++++---
 2 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index dd0a986..cc7a376 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -511,15 +511,9 @@ string dropped into the current buffer."
     (set-frame-selected-window nil window)
     (raise-frame)
     (setq window (selected-window))
-    (cond ((memq 'ns-drag-operation-generic operations)
-           ;; Perform the default action for the type.
-           (if (eq type 'file)
-               (dolist (data objects)
-                 (dnd-handle-one-url window 'private (concat "file:" data)))
-             (dnd-insert-text window 'private string)))
-          ((memq 'ns-drag-operation-copy operations)
-           ;; Try to open the file/URL.  If type is nil, try to open
-           ;; it as a URL anyway.
+    (cond ((or (memq 'ns-drag-operation-generic operations)
+               (memq 'ns-drag-operation-copy operations))
+           ;; Perform the default/copy action.
            (dolist (data objects)
              (dnd-handle-one-url window 'private (if (eq type 'file)
                                                      (concat "file:" data)
diff --git a/src/xdisp.c b/src/xdisp.c
index 9e8f4fc..536bea6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21998,13 +21998,14 @@ extend_face_to_end_of_line (struct it *it)
      in the text area has to be drawn to the end of the text area.  */
   it->glyph_row->fill_line_p = true;
 
+  const int orig_face_id = it->face_id;
   /* If current character of IT is not ASCII, make sure we have the
      ASCII face.  This will be automatically undone the next time
      get_next_display_element returns a multibyte character.  Note
      that the character will always be single byte in unibyte
      text.  */
   if (!ASCII_CHAR_P (it->c))
-      it->face_id = FACE_FOR_CHAR (f, face, 0, -1, Qnil);
+    it->face_id = FACE_FOR_CHAR (f, face, 0, -1, Qnil);
 
   /* The default face, possibly remapped. */
   struct face *default_face =
@@ -22198,6 +22199,7 @@ extend_face_to_end_of_line (struct it *it)
          if (stretch_width < 0)
            it->glyph_row->x = stretch_width;
        }
+      it->face_id = orig_face_id;
     }
   else
 #endif /* HAVE_WINDOW_SYSTEM */
@@ -22207,7 +22209,6 @@ extend_face_to_end_of_line (struct it *it)
       struct text_pos saved_pos = it->position;
       Lisp_Object saved_object = it->object;;
       enum display_element_type saved_what = it->what;
-      int saved_face_id = it->face_id;
 
       it->what = IT_CHARACTER;
       memset (&it->position, 0, sizeof it->position);
@@ -22310,7 +22311,7 @@ extend_face_to_end_of_line (struct it *it)
       it->object = saved_object;
       it->position = saved_pos;
       it->what = saved_what;
-      it->face_id = saved_face_id;
+      it->face_id = orig_face_id;
     }
 }
 



reply via email to

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