Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab completion deletes previous lines #9152

Closed
forivall opened this issue Aug 5, 2020 · 9 comments
Closed

Tab completion deletes previous lines #9152

forivall opened this issue Aug 5, 2020 · 9 comments
Labels
Area: theme Issue or PR related to a theme Support Request for support Topic: completion Pull Request or issue regarding completion

Comments

@forivall
Copy link
Contributor

forivall commented Aug 5, 2020

Describe the bug
Pressing "tab" to show completions moves the cursor up.

To Reproduce
Steps to reproduce the behavior, for example:

  1. Type ls
  2. Press TAB

Expected behavior
The completions should display normally

Screenshots and/or Recordings
Oddly, it didn't happen while recording with asciinema https://asciinema.org/a/geLNA4otKpRa31LJuMSNAeAES

Kapture 2020-08-04 at 20 17 31

Self Check

it happens because of cf347ef

Desktop (please complete the following information):

  • OS / Distro: macOS
  • If on Windows what version of WSL: [e.g. WSL1, WSL2]
  • Latest ohmyzsh update?: Yes -- it specifically happens in cf347ef -- checking out git checkout cf347ef^ works around the issue
  • ZSH Version: 5.8
  • Terminal emulator: iTerm2

Additional context
my dotfiles are at https://github.com/forivall/dotfiles

@forivall forivall added the Support Request for support label Aug 5, 2020
@mcornella
Copy link
Member

Before cf347ef COMPLETION_WAITING_DOTS wasn't set up in vi keymaps, so this is more an issue with the expand-or-complete-with-dots function. This has been reported before but your zsh version should have taken care of it.

Do you have a working UTF-8 locale? Run locale (current set locale) and locale -a (installed locales) to check.

@mcornella mcornella added Area: theme Issue or PR related to a theme Topic: completion Pull Request or issue regarding completion labels Aug 5, 2020
@forivall
Copy link
Contributor Author

forivall commented Aug 5, 2020

» locale
LANG="en_CA.UTF-8"
LC_COLLATE="en_CA.UTF-8"
LC_CTYPE="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="en_CA.UTF-8"
LC_ALL=
locale -a
en_NZ
nl_NL.UTF-8
pt_BR.UTF-8
fr_CH.ISO8859-15
eu_ES.ISO8859-15
en_US.US-ASCII
af_ZA
bg_BG
cs_CZ.UTF-8
fi_FI
zh_CN.UTF-8
eu_ES
sk_SK.ISO8859-2
nl_BE
fr_BE
sk_SK
en_US.UTF-8
en_NZ.ISO8859-1
de_CH
sk_SK.UTF-8
de_DE.UTF-8
am_ET.UTF-8
zh_HK
be_BY.UTF-8
uk_UA
pt_PT.ISO8859-1
en_AU.US-ASCII
kk_KZ.PT154
en_US
nl_BE.ISO8859-15
de_AT.ISO8859-1
hr_HR.ISO8859-2
fr_FR.ISO8859-1
af_ZA.UTF-8
am_ET
fi_FI.ISO8859-1
ro_RO.UTF-8
af_ZA.ISO8859-15
en_NZ.UTF-8
fi_FI.UTF-8
hr_HR.UTF-8
da_DK.UTF-8
ca_ES.ISO8859-1
en_AU.ISO8859-15
ro_RO.ISO8859-2
de_AT.UTF-8
pt_PT.ISO8859-15
sv_SE
fr_CA.ISO8859-1
fr_BE.ISO8859-1
en_US.ISO8859-15
it_CH.ISO8859-1
en_NZ.ISO8859-15
en_AU.UTF-8
de_AT.ISO8859-15
af_ZA.ISO8859-1
hu_HU.UTF-8
et_EE.UTF-8
he_IL.UTF-8
uk_UA.KOI8-U
be_BY
kk_KZ
hu_HU.ISO8859-2
it_CH
pt_BR
ko_KR
it_IT
fr_BE.UTF-8
ru_RU.ISO8859-5
zh_TW
zh_CN.GB2312
no_NO.ISO8859-15
de_DE.ISO8859-15
en_CA
fr_CH.UTF-8
sl_SI.UTF-8
uk_UA.ISO8859-5
pt_PT
hr_HR
cs_CZ
fr_CH
he_IL
zh_CN.GBK
zh_CN.GB18030
fr_CA
pl_PL.UTF-8
ja_JP.SJIS
sr_YU.ISO8859-5
be_BY.CP1251
sr_YU.ISO8859-2
sv_SE.UTF-8
sr_YU.UTF-8
de_CH.UTF-8
sl_SI
pt_PT.UTF-8
ro_RO
en_NZ.US-ASCII
ja_JP
zh_CN
fr_CH.ISO8859-1
ko_KR.eucKR
be_BY.ISO8859-5
nl_NL.ISO8859-15
en_GB.ISO8859-1
en_CA.US-ASCII
is_IS.ISO8859-1
ru_RU.CP866
nl_NL
fr_CA.ISO8859-15
sv_SE.ISO8859-15
hy_AM
en_CA.ISO8859-15
en_US.ISO8859-1
zh_TW.Big5
ca_ES.UTF-8
ru_RU.CP1251
en_GB.UTF-8
en_GB.US-ASCII
ru_RU.UTF-8
eu_ES.UTF-8
es_ES.ISO8859-1
hu_HU
el_GR.ISO8859-7
en_AU
it_CH.UTF-8
en_GB
sl_SI.ISO8859-2
ru_RU.KOI8-R
nl_BE.UTF-8
et_EE
fr_FR.ISO8859-15
cs_CZ.ISO8859-2
lt_LT.UTF-8
pl_PL.ISO8859-2
fr_BE.ISO8859-15
is_IS.UTF-8
tr_TR.ISO8859-9
da_DK.ISO8859-1
lt_LT.ISO8859-4
lt_LT.ISO8859-13
zh_TW.UTF-8
bg_BG.CP1251
el_GR.UTF-8
be_BY.CP1131
da_DK.ISO8859-15
is_IS.ISO8859-15
no_NO.ISO8859-1
nl_NL.ISO8859-1
nl_BE.ISO8859-1
sv_SE.ISO8859-1
pt_BR.ISO8859-1
zh_CN.eucCN
it_IT.UTF-8
en_CA.UTF-8
uk_UA.UTF-8
de_CH.ISO8859-15
de_DE.ISO8859-1
ca_ES
sr_YU
hy_AM.ARMSCII-8
ru_RU
zh_HK.UTF-8
eu_ES.ISO8859-1
is_IS
bg_BG.UTF-8
ja_JP.UTF-8
it_CH.ISO8859-15
fr_FR.UTF-8
ko_KR.UTF-8
et_EE.ISO8859-15
kk_KZ.UTF-8
ca_ES.ISO8859-15
en_IE.UTF-8
es_ES
de_CH.ISO8859-1
en_CA.ISO8859-1
es_ES.ISO8859-15
en_AU.ISO8859-1
el_GR
da_DK
no_NO
it_IT.ISO8859-1
en_IE
zh_HK.Big5HKSCS
hi_IN.ISCII-DEV
ja_JP.eucJP
it_IT.ISO8859-15
pl_PL
ko_KR.CP949
fr_CA.UTF-8
fi_FI.ISO8859-15
en_GB.ISO8859-15
fr_FR
hy_AM.UTF-8
no_NO.UTF-8
es_ES.UTF-8
de_AT
tr_TR.UTF-8
de_DE
lt_LT
tr_TR
C
POSIX

@forivall
Copy link
Contributor Author

forivall commented Aug 5, 2020

I tried adding export LC_ALL="en_CA.UTF-8" to my zshrc, but no dice :(

@mcornella
Copy link
Member

Yeah, locale is all correct. What theme are you using?

@mcornella
Copy link
Member

Nevermind, I'm looking at your dotfiles.

@forivall
Copy link
Contributor Author

forivall commented Aug 6, 2020

Yeah, my dotfiles are a little hairy. Let me know if you need any help. I use zgen to load omz and https://github.com/sindresorhus/pure for my theme

It could be an odd interaction with pure, I can check their issues in the morn

@mcornella
Copy link
Member

mcornella commented Aug 6, 2020

Yeah, this is the same as sindresorhus/pure#372. The offending line in expand-or-complete-with-dots is zle redisplay, but I was under the impression that Zsh 5.8 handled multiline prompts correctly. I'll investigate further...

@mcornella
Copy link
Member

I can't reproduce this problem in a zsh 5.8 docker container and your dotfiles. I have no other ideas, try to disable stuff in your zshrc file until it no longer happens. Otherwise you can disable COMPLETION_WAITING_DOTS. You won't get the ellipsis when completing but you won't get the problem either.

@forivall
Copy link
Contributor Author

yeah, i just disabled COMPLETION_WAITING_DOTS, not really worth diving in further to figure this one out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: theme Issue or PR related to a theme Support Request for support Topic: completion Pull Request or issue regarding completion
Projects
None yet
Development

No branches or pull requests

2 participants