]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix default value in selects in eww
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 5 Sep 2020 13:50:40 +0000 (15:50 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 5 Sep 2020 13:50:40 +0000 (15:50 +0200)
* lisp/net/eww.el (eww-change-select): Make hitting RET with an
empty string use a default (bug#43218).

lisp/net/eww.el

index dedf1c62717d84906426d1435ed4a73b0129322c..b800d1890fedb925f5f87ac0c36e9672fef5335e 100644 (file)
@@ -1451,7 +1451,9 @@ See URL `https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Input'.")
                                     (plist-get (cdr elem) :value))))
                        input)))
         (display
-         (completing-read "Change value: " options nil 'require-match))
+         (completing-read "Change value: " options nil 'require-match
+                           nil nil (car (rassoc (plist-get input :value)
+                                                options))))
         (inhibit-read-only t))
     (plist-put input :value (cdr (assoc-string display options t)))
     (goto-char