dail8859/NotepadNext

Editor Context Menu Location

已关闭

#780 创建于 2025年5月27日

 (1 条评论) (0 个反应) (0 位负责人)C++ (905 个派生)batch import
good first issue

仓库指标

星标
 (14,479 个星标)
PR 合并指标
 (平均合并 9天 1小时) (30 天内合并 3 个 PR)

描述

Description

When right-clicking in the editor there is inconsistent behavior because some commands use the position of the mouse to determine if some things can be used (e.g. a URL), but others need the current caret position (markers).

Describe the solution you'd like

It seems most editors rely on the logic:

  • If the right click is inside a selection, do not change the selection at all, then open the context menu based on the current selection.
  • If the right click is outside the selection, place the caret as the mouse position, then open the context menu based on the new location.

Describe alternatives you've considered

None - Most editors seem to have the described behavior.

贡献者指南