micro-editor / micro-editor/micro

Changing the height of a pane (using Lua) behaves differently from changing the width

Open
#1,116 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description of the problem or steps to reproduce

When I run this code:

function widen()
	CurView().Width = CurView().Width + 1
	CurView().lockWidth = true
	for i = 1, #tabs do
		if i ~= curTab then
			tabs[i]:Resize()
		end
	end
	CurView().lockWidth = false
end

It widens the tab and then resizes the rest of the tabs to fit the screen. However, running this code

function tallen()
	CurView().Height = CurView().Height + 1
	CurView().lockHeight = true
	for i = 1, #tabs do
		if i ~= curTab then
			tabs[i]:Resize()
		end
	end
	CurView().lockHeight = false
end

Does nothing.

Commit hash: af520cf
OS: macOS
Terminal: iTerm2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue at commit af520cf using the Lua CurView().Width and CurView().Height snippets. Start by tracing CurView, the Resize calls, and the lockWidth/lockHeight properties, comparing the width and height paths; done means changing Height behaves consistently with changing Width and the pane layout is resized correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, lua
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.