diff options
| author | opalmay <[email protected]> | 2023-01-13 14:44:09 +0200 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2023-01-13 14:44:09 +0200 | 
| commit | 4455bd2add5f3c53593cefb84fe13731adc54376 (patch) | |
| tree | b5d551a921d5ed88512c3ed3c10fdb6f6c83d560 /lua/lvim/utils | |
| parent | f590770a17770f5cb74186e15204a9ffe1b96beb (diff) | |
refactor(quit)!: use native quit confirm (#3721)
Diffstat (limited to 'lua/lvim/utils')
| -rw-r--r-- | lua/lvim/utils/functions.lua | 17 | 
1 files changed, 0 insertions, 17 deletions
| diff --git a/lua/lvim/utils/functions.lua b/lua/lvim/utils/functions.lua index efc4b5eb..b2b194ed 100644 --- a/lua/lvim/utils/functions.lua +++ b/lua/lvim/utils/functions.lua @@ -1,22 +1,5 @@  local M = {} -function M.smart_quit() -  local bufnr = vim.api.nvim_get_current_buf() -  local buf_windows = vim.call("win_findbuf", bufnr) -  local modified = vim.api.nvim_buf_get_option(bufnr, "modified") -  if modified and #buf_windows == 1 then -    vim.ui.input({ -      prompt = "You have unsaved changes. Quit anyway? (y/n) ", -    }, function(input) -      if input == "y" then -        vim.cmd "q!" -      end -    end) -  else -    vim.cmd "q!" -  end -end -  function M.isempty(s)    return s == nil or s == ""  end | 
