martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.19k stars 260 forks source link

OSX: Buffer scrambled when scrolling with ctrl+d, ctrl+u #1155

Open mk-f opened 7 months ago

mk-f commented 7 months ago

When hitting ctrl+d or ctrl+u to scroll, parts of the screen are not redrawn correctly, giving the impression of deleted lines, please see: https://asciinema.org/a/8iM3kMOYT9oVapCjpVzl83E4N

This seems to be an issue with curses, compiling without curses solves this, but gives me flickering while scrolling instead.

tested with d1eb36c96a5d98b0ea9a4422fbd247261e169fa5 and the project lua/visrc.lua, config.mk:

# This version of config.mk was generated by:
# ./configure
# Any changes made here will be lost if configure is re-run
SRCDIR = .
PREFIX = /usr/local
EXEC_PREFIX = $(PREFIX)
BINDIR = $(EXEC_PREFIX)/bin
DOCPREFIX = $(PREFIX)/share/doc
MANPREFIX = $(PREFIX)/share/man
SHAREPREFIX = $(PREFIX)/share
CC = cc
CFLAGS = -pipe -O2 -ffunction-sections -fdata-sections -fPIE
LDFLAGS =
CFLAGS_STD = -std=c99 -U_XOPEN_SOURCE -D_XOPEN_SOURCE=700 -DNDEBUG -MMD -D_DARWIN_C_SOURCE
LDFLAGS_STD = -lc
CFLAGS_AUTO = -fstack-protector-all
LDFLAGS_AUTO =
CFLAGS_DEBUG = -U_FORTIFY_SOURCE -UNDEBUG -O0 -g3 -ggdb -Wall -Wextra -pedantic -Wno-missing-field-initializers -Wno-unused-parameter
CONFIG_HELP = 1
CFLAGS_TERMKEY = -I/usr/local/Cellar/libtermkey/0.22/include
LDFLAGS_TERMKEY = -L/usr/local/Cellar/libtermkey/0.22/lib -ltermkey
CONFIG_CURSES = 1
CFLAGS_CURSES =
LDFLAGS_CURSES = -lcurses
REGEX_SRC = text-regex.c
CONFIG_TRE = 0
CFLAGS_TRE =
LDFLAGS_TRE =
CONFIG_LUA = 1
CFLAGS_LUA = -I/usr/local/include/lua -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 -DLUA_COMPAT_5_3 -DLUA_COMPAT_ALL
LDFLAGS_LUA = -L/usr/local/lib -llua -lm
CONFIG_LPEG = 0
CFLAGS_LPEG =
LDFLAGS_LPEG =
CONFIG_ACL = 0
CFLAGS_ACL =
LDFLAGS_ACL =
CONFIG_SELINUX = 0
CFLAGS_SELINUX =
LDFLAGS_SELINUX =
CFLAGS_LIBC = -DHAVE_MEMRCHR=0
rnpnr commented 7 months ago

I thought this was reported before but I can't seem to find a link. I'm not able to recreate locally and I don't have access to a macOS system for testing.

Which terminal emulator are you using? That may help if someone else is able to look into this.

mk-f commented 7 months ago

iTerm2, but it behaves the same with Terminal.