Skip to content

BUG: After exiting debug mode, x is no longer working in NORMAL mode. #10

@bokonist

Description

@bokonist

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.

Neovim version (nvim -v)

0.11.1

Operating system/version

OS: Manjaro Linux x86_64 Kernel: 6.6.88-1-MANJARO

Describe the bug

x to delete the char under the cursor is no longer working in normal mode after debug mode is exited. after debug mode is exited, it's not falling back to the original behavior.

Steps To Reproduce

  1. Enter debug mode (:lua require("debugmaster").mode.toggle())
  2. exit debug mode (:lua require("debugmaster").mode.toggle())
  3. use x to delete character under cursor. does not work.

Expected Behavior

go back to default behavior of x

I suspect this is because of this keymap inside debug mode:
x Execute last yanked or deleted text in the repl

Repro (Ignore if not applicable or if the issue is easily reproducible.)

-- set stdpaths to the current directory
local initlua_root = vim.fn.fnamemodify(debug.getinfo(1).short_src, ":p:h")
for _, name in ipairs { "config", "data", "state", "cache" } do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = initlua_root .. "/" .. name
end

-- bootstrap lazy
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
  local lazyrepo = "https://github.com/folke/lazy.nvim.git"
  vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
end
vim.opt.rtp:prepend(lazypath)


vim.g.mapleader = " "
require("lazy").setup({
  spec = {
      {
        "mfussenegger/nvim-dap",
        config = function()
          local dap = require("dap")
          -- Configure your debug adapters here
          -- https://github.com/mfussenegger/nvim-dap/blob/master/doc/dap.txt
        end,
      },
      {
        "miroshQa/debugmaster.nvim",
        config = function()
          local dm = require("debugmaster")
          vim.keymap.set({ "n", "v" }, "<leader>d", dm.mode.toggle, { nowait = true })
          vim.keymap.set("t", "<C-/>", "<C-\\><C-n>", { desc = "Exit terminal mode" })
        end
      }
  },
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions