Coder Social home page Coder Social logo

Comments (3)

justinmk avatar justinmk commented on June 25, 2024 1

Even if this bug is fixed, it can't be fixed for 0.9.5. Please test the latest stable release.

from neovim.

zeertzjq avatar zeertzjq commented on June 25, 2024

Hmm, it's strange that the height is correct, but the width is not.

from neovim.

umlx5h avatar umlx5h commented on June 25, 2024

This problem also occurs in the latest v0.11.0 in my environment.

terminal: wezterm, with tmux

hot to reproduce

  1. Execute ex cmd :vsplit | term
  2. Execute shell stty -a
$ stty -a | head -1
speed 0 baud; rows 26; columns 57; line = 0;
  1. Press CTRL+\ CTRL+N, then Execute ex cmd redraw!
  2. Execute shell stty -a again
# the columns is changing even though the window width is not changing.
$ stty -a | head -1
speed 0 baud; rows 26; columns 55; line = 0;

For this reason I have put redraw in the map to eliminate this problem.

vim.keymap.set("n", "<leader>ts", "<cmd> split | redraw! | terminal <cr>", { desc = "Horizontal terminal" })
vim.keymap.set("n", "<leader>tv", "<cmd> vsplit | redraw! | terminal <cr>", { desc = "Vertical terminal" })
vim.keymap.set("n", "<leader>tn", "<cmd> tabedit | redraw! | terminal <cr>", { desc = "Terminal in New tab" })

PS: I'm sorry, My problem was due to the following autocmd
Removing setlocal nonumber fixed the problem.

local autoInsertTerminal = vim.api.nvim_create_augroup("auto_insert_terminal", {})
-- auto enter to insert mode in Terminal mode
vim.api.nvim_create_autocmd("TermOpen", {
	group = autoInsertTerminal,
	pattern = "*",
	callback = function()
		vim.cmd([[
			setlocal nonumber norelativenumber
			startinsert
		]])
	end,
})

from neovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.