commit 6e362a32bc9d21f73a0f29ca6f45481edeea6f29 (HEAD, refs/remotes/origin/master) Author: Ari Roponen Date: Sun May 6 15:29:28 2018 +0300 Fix cairo scrolling for side-by-side windows * src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for side-by-side split windows. (Bug#31288) diff --git a/src/xterm.c b/src/xterm.c index 35e10568fa..3f956d950d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4260,6 +4260,7 @@ x_scroll_run (struct window *w, struct run *run) #ifdef USE_CAIRO if (FRAME_CR_CONTEXT (f)) { + int wx = WINDOW_LEFT_EDGE_X (w); cairo_surface_t *s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); cairo_t *cr = cairo_create (s); @@ -4270,8 +4271,8 @@ x_scroll_run (struct window *w, struct run *run) cr = FRAME_CR_CONTEXT (f); cairo_save (cr); - cairo_set_source_surface (cr, s, 0, to_y); - cairo_rectangle (cr, x, to_y, width, height); + cairo_set_source_surface (cr, s, wx, to_y); + cairo_rectangle (cr, wx, to_y, width, height); cairo_fill (cr); cairo_restore (cr); cairo_surface_destroy (s); commit 91e582a31ada28fab5ae55bdbf959a9d30796587 Author: Eli Zaretskii Date: Sun May 6 21:20:31 2018 +0300 Don't remove highlight of misspelled word on pdict save * lisp/textmodes/ispell.el (ispell-pdict-save): Don't restart flyspell-mode, as bug#11963, which this was supposed to fix, is fixed better by ispell-command-loop, when the user types 'i' or 'a'. Restarting Flyspell mode when the personal dictionary is saved caused bug#31372 as side effect. (ispell-command-loop): Test 'flyspell-mode', not whether flyspell-unhighlight-at is fboundp, to determine whether Flyspell mode is turned on in the current buffer. (flyspell-unhighlight-at): Add declare-function form for it. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 1dc3965086..d03d12b375 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -117,6 +117,8 @@ (defalias 'check-ispell-version 'ispell-check-version) +(declare-function flyspell-unhighlight-at "flyspell" (pos)) + ;;; ********************************************************************** ;;; The following variables should be set according to personal preference ;;; and location of binaries: @@ -2086,10 +2088,7 @@ If so, ask if it needs to be saved." (or no-query (y-or-n-p "Personal dictionary modified. Save? "))) (ispell-send-string "#\n") ; save dictionary - (message "Personal dictionary saved.") - (when flyspell-mode - (flyspell-mode 0) - (flyspell-mode 1))) + (message "Personal dictionary saved.")) ;; unassert variable, even if not saved to avoid questioning. (setq ispell-pdict-modified-p nil)) @@ -2217,15 +2216,16 @@ Global `ispell-quit' set to start location to continue spell session." ((= char ?i) ; accept and insert word into pers dict (ispell-send-string (concat "*" word "\n")) (setq ispell-pdict-modified-p '(t)) ; dictionary modified! - (when (fboundp 'flyspell-unhighlight-at) - (flyspell-unhighlight-at start)) + + (when flyspell-mode + (flyspell-unhighlight-at start)) nil) ((or (= char ?a) (= char ?A)) ; accept word without insert (ispell-send-string (concat "@" word "\n")) (cl-pushnew word ispell-buffer-session-localwords :test #'equal) - (when (fboundp 'flyspell-unhighlight-at) - (flyspell-unhighlight-at start)) + (when flyspell-mode + (flyspell-unhighlight-at start)) (or ispell-buffer-local-name ; session localwords might conflict (setq ispell-buffer-local-name (buffer-name))) (if (null ispell-pdict-modified-p) commit 6464a8d702d56f26d34d989a9182396cdc6197a8 Author: Michael Albinus Date: Sun May 6 12:39:36 2018 +0200 Fix Bug#31272 * lisp/net/tramp-sh.el (tramp-do-file-attributes-with-ls) (tramp-do-directory-files-and-attributes-with-stat) (tramp-sh-handle-insert-directory): Use "--show-control-chars". (tramp-convert-file-attributes): Decode multibyte strings, produced by "stat". (Bug#31272) * test/lisp/net/tramp-tests.el (tramp--test-utf8): Extend test. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 58982e58bb..9ea23a4edb 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1301,7 +1301,8 @@ component is used as the target of the symlink." ;; On systems which have no quoting style, file names ;; with special characters could fail. (cond - ((tramp-get-ls-command-with vec "--quoting-style=c")) + ((tramp-get-ls-command-with + vec "--quoting-style=literal --show-control-chars")) ((tramp-get-ls-command-with vec "-w")) (t "")) (tramp-shell-quote-argument localname))) @@ -1833,7 +1834,8 @@ be non-negative integers." ;; On systems which have no quoting style, file names with special ;; characters could fail. (cond - ((tramp-get-ls-command-with vec "--quoting-style=shell")) + ((tramp-get-ls-command-with + vec "--quoting-style=literal --show-control-chars")) ((tramp-get-ls-command-with vec "-w")) (t "")) (tramp-get-remote-stat vec) @@ -2635,8 +2637,11 @@ The method used must be an out-of-band method." filename switches wildcard full-directory-p) (when (stringp switches) (setq switches (split-string switches))) - (when (tramp-get-ls-command-with v "--quoting-style=literal") - (setq switches (append switches '("--quoting-style=literal")))) + (when (tramp-get-ls-command-with + v "--quoting-style=literal --show-control-chars") + (setq switches + (append + switches '("--quoting-style=literal" "--show-control-chars")))) (unless (tramp-get-ls-command-with v "--dired") (setq switches (delete "--dired" switches))) (when wildcard @@ -5135,11 +5140,12 @@ Return ATTR." (when (string-match "^d" (nth 8 attr)) (setcar attr t)) ;; Convert symlink from `tramp-do-file-attributes-with-stat'. + ;; Decode also multibyte string. (when (consp (car attr)) - (if (and (stringp (caar attr)) - (string-match ".+ -> .\\(.+\\)." (caar attr))) - (setcar attr (match-string 1 (caar attr))) - (setcar attr nil))) + (setcar attr + (and (stringp (caar attr)) + (string-match ".+ -> .\\(.+\\)." (caar attr)) + (decode-coding-string (match-string 1 (caar attr)) 'utf-8)))) ;; Set file's gid change bit. (setcar (nthcdr 9 attr) (if (numberp (nth 3 attr)) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 1843be7186..15187efdd3 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4697,29 +4697,30 @@ Use the `ls' command." (coding-system-change-eol-conversion utf8 'unix))) (apply 'tramp--test-check-files - (if (tramp--test-expensive-test) - (delete-dups - (mapcar - ;; Use all available language specific snippets. Filter - ;; out strings which use unencodable characters. Remove - ;; slash or newline. Not Tramp's business. - (lambda (x) - (setq x (eval (cdr (assoc 'sample-text x)))) - (unless (or (null x) - (unencodable-char-position - 0 nil file-name-coding-system nil x) - (string-match "TaiViet" x)) - ;; ?\n and ?/ shouldn't be part of any file name. ?\t, - ;; ?. and ?? do not work for "smb" method. - (replace-regexp-in-string "[\t\n/.?]" "" x))) - language-info-alist)) - - (list - (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") - (unless (tramp--test-hpux-p) - "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") - "银河系漫游指南系列" - "Автостопом по гала́ктике"))))) + (append + (list + (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ") + (unless (tramp--test-hpux-p) + "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت") + "银河系漫游指南系列" + "Автостопом по гала́ктике" + ;; Use codepoints without a name. See Bug#31272. + "™›šbung") + + (when (tramp--test-expensive-test) + (delete-dups + (mapcar + ;; Use all available language specific snippets. Filter out + ;; strings which use unencodable characters. + (lambda (x) + (and + (stringp (setq x (eval (get-language-info (car x) 'sample-text)))) + (not (unencodable-char-position + 0 nil file-name-coding-system nil x)) + ;; ?\n and ?/ shouldn't be part of any file name. ?\t, + ;; ?. and ?? do not work for "smb" method. + (replace-regexp-in-string "[\t\n/.?]" "" x))) + language-info-alist))))))) (ert-deftest tramp-test39-utf8 () "Check UTF8 encoding in file names and file contents."