https://bugs.kde.org/show_bug.cgi?id=511173

            Bug ID: 511173
           Summary: clipboard causes loss of focus
    Classification: Plasma
           Product: plasmashell
      Version First 6.5.0
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: 1.0

SUMMARY
Plasma 6.5.0 seems to loose keyboard focus when copying to the clipboard.
Encountered when using neovim. key-repeat when holding down `x` in neovim
normal mode not working and only deleting a single character when using the
`vim.opt.clipboard = 'unnamedplus'` setting.

I have tested this with `nvim` in Konsole and Terminator and with `neovide`.
All behave the same.

STEPS TO REPRODUCE
1.  write the following to `/tmp/init.lua`
```
local function log_event(event)
  local f = io.open("/tmp/focus.log", "a")
  f:write(string.format("[%s] %s\n", os.date("%Y-%m-%d %H:%M:%S"), event))
  f:close()
end

vim.api.nvim_create_autocmd("FocusLost", { callback = function()
log_event("FocusLost") end })
vim.api.nvim_create_autocmd("FocusGained", { callback = function()
log_event("FocusGained") end })
log_event("Start")

vim.opt.clipboard = 'unnamedplus'
```
2. run `echo "this is an example" > /tmp/example.txt`
3. in a separate terminal run `touch /tmp/focus.log && tail -f /tmp/focus.log`
4. run `nvim -u /tmp/init.lua /tmp/example.txt`
5. press and hold `x`

OBSERVED RESULT
only one character is deleted and `focus.log` indicates that focus was lost and
immediately regained.

EXPECTED RESULT
holding down `x` should initiate key-repeat and the entire line should be
deleted. The focus log should remain empty other than the `Start` message. This
is the case for Plasma 6.4.5 and Gnome.


SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.0
KDE Frameworks Version: 6.19.0
Qt Version: 6.10.0
Kernel Version: 6.12.53-1-lts (64-bit)
Graphics Platform: Wayland
neovim: v0.11.4


ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to