Skip to content

Incorrect message after new file created #1138

Closed
@towry

Description

@towry

Description

It should only output [full_path] was properly created, but instead, it output Create file[full_path][full_path] was properly created

截屏2022-04-06 下午7 20 04

Neovim version

NVIM v0.7.0-dev+1387-gd73bf3138
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by towry@towryDeMpb.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD-d73bf31/share/nvim"


### Operating system and version

macOS  12.2.1

### nvim-tree version

924aa290921426682f86495cf64f48fcdab3c2fd

### Steps to reproduce

1. In the tree, press key `a` to add a file under a directory.
2. In the bottom, input the file name after the path `/Users/towry/xxx/xxxx/xx/new_file_name.lua`
3. press `Enter` key

### Expected behavior

It should only output `[full_path] was properly created`

### Actual behavior

It concatcate the previous message string with the new message string, making it hard to read.

### Minimal config

```Lua
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
  require("packer").startup {
    {
      "wbthomason/packer.nvim",
      "kyazdani42/nvim-tree.lua",
      "kyazdani42/nvim-web-devicons",
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. "/plugin/packer_compiled.lua",
      display = { non_interactive = true },
    },
  }
end
if vim.fn.isdirectory(install_path) == 0 then
  print "Installing nvim-tree and dependencies."
  vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true

-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
  require("nvim-tree").setup {}
end


https://github.com/towry/dotfiles/tree/master/link/.config/nvim

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions