DogLooksGood / emacs-rime

RIME ㄓ in Emacs
GNU General Public License v3.0
474 stars 68 forks source link

[BUG] 使用 posframe 作为候选框时失去焦点 鼠标光标被自动移动到左上角 #110

Closed shrubbroom closed 4 years ago

shrubbroom commented 4 years ago

问题描述 如题 在使用 posframe 做为候选框时会失去对当前 buffer 的焦点 具体影响为 powerline 会变成失去焦点的样式 同时鼠标光标被自动移动到 Emacs 窗口的右上角 在每一次输入一个新的拼音后光标都会被移动

是否是 posframe 上游的问题

Emacs中的配置

(use-package rime
  :ensure t
  :custom
  (default-input-method "rime")
  :config
  (define-key prog-mode-map (kbd "C-SPC") 'toggle-input-method)
  (define-key text-mode-map (kbd "C-SPC") 'toggle-input-method)
  (setq rime-show-candidate 'posframe)
  (setq rime-user-data-dir "/home/shrubbroom/.local/share/fcitx5/rime/")
  (setq rime-inline-ascii-trigger 'shift-l)
  (setq rime-translate-keybindings
        '("C-f" "C-b" "C-n" "C-p" "C-g"))
  (setq rime-show-preedit 'inline)
  (setq rime-posframe-properties
        (list :font "-ADBO-Source Han Sans CN-normal-normal-normal-*-20-*-*-*-*-0-iso10646-1"
              :internal-border-width 3))
  (setq rime-disable-predicates
        '(rime-predicate-space-after-cc-p
          rime-predicate-current-uppercase-letter-p
          rime-predicate-after-alphabet-char-p
          rime-predicate-evil-mode-p
          ))
  )

复现方式(安装遇到问题时省略)

在 Emacs 中使用 emacs-rime 输入

是否可在 emacs -Q 中复现

环境信息

Z572 commented 4 years ago

是 posframe 的问题,可以设置 posframe-mouse-banish 为 nil 禁用,但不推荐

---原始邮件--- 发件人: "shrubbroom"<notifications@github.com> 发送时间: 2020年7月20日(周一) 下午4:39 收件人: "DogLooksGood/emacs-rime"<emacs-rime@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [DogLooksGood/emacs-rime] [BUG] 使用 posframe 作为候选框时失去焦点 鼠标光标被自动移动到左上角 (#110)

问题描述 如题 在使用 posframe 做为候选框时会失去对当前 buffer 的焦点 具体影响为 powerline 会变成失去焦点的样式 同时鼠标光标被自动移动到 Emacs 窗口的右上角 在每一次输入一个新的拼音后光标都会被移动

是否是 posframe 上游的问题

Emacs中的配置 (use-package rime :ensure t :custom (default-input-method "rime") :config (define-key prog-mode-map (kbd "C-SPC") 'toggle-input-method) (define-key text-mode-map (kbd "C-SPC") 'toggle-input-method) (setq rime-show-candidate 'posframe) (setq rime-user-data-dir "/home/shrubbroom/.local/share/fcitx5/rime/") (setq rime-inline-ascii-trigger 'shift-l) (setq rime-translate-keybindings '("C-f" "C-b" "C-n" "C-p" "C-g")) (setq rime-show-preedit 'inline) (setq rime-posframe-properties (list :font "-ADBO-Source Han Sans CN-normal-normal-normal--20----*-0-iso10646-1" :internal-border-width 3)) (setq rime-disable-predicates '(rime-predicate-space-after-cc-p rime-predicate-current-uppercase-letter-p rime-predicate-after-alphabet-char-p rime-predicate-evil-mode-p )) )
复现方式(安装遇到问题时省略)

在 Emacs 中使用 emacs-rime 输入

是否可在 emacs -Q 中复现

环境信息

操作系统: ArchLinux

Emacs版本: 27.0.91

Librime版本:1.5.3

Librime安装方式:包管理器

安装方式:Melpa

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.