Skip to content

Chat: Add setting to control space after autocomplete - #17375

Open
SmallJoker wants to merge 2 commits into
luanti-org:masterfrom
SmallJoker:pr_17375_autocomplete_setting
Open

Chat: Add setting to control space after autocomplete#17375
SmallJoker wants to merge 2 commits into
luanti-org:masterfrom
SmallJoker:pr_17375_autocomplete_setting

Conversation

@SmallJoker

@SmallJoker SmallJoker commented Jul 26, 2026

Copy link
Copy Markdown
Member

Requested here https://irc.luanti.org/luanti-dev/2026-07-25#i_6333876

  • set to true (default)
    • "hello singleplayer "
    • "singleplayer: "
  • set to false
    • "hello singleplayer" (no tailing space)
    • "singleplayer: " (no change)

Useful to add punctuation after the player name. I am however used to have a space character inserted after autocomplete, thus introduced new setting.

To do

This PR is Ready for Review.

How to test

  1. Join a world (or use the ncurses terminal)
  2. Autocomplete
  3. Compare
  4. ???
  5. Profit

@SmallJoker SmallJoker added Feature ✨ PRs that add or enhance a feature @ Client / Controls / Input labels Jul 26, 2026
@Zughy

Zughy commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Can't we just have the no-space option? If people want a space after like if it was a terminal autocomplete, they can just press space. I don't think a setting is needed

@SmallJoker

Copy link
Copy Markdown
Member Author

I would like to have the space character.

  1. It gives a visual feedback that the autocompletion is done.
  2. It's convenient for entering chat commands and other applications handle it the same way:
    • HexChat
    • GitHub (@ Name)
    • Outlook (@ Name)

@sfan5

sfan5 commented Jul 26, 2026

Copy link
Copy Markdown
Member

how about allowing an arbitrary string? My IRC client completes : and I could imagine some people might want , .

@SmallJoker

Copy link
Copy Markdown
Member Author

how about allowing an arbitrary string?

Space and empty string are not something that can be distinguished without hacks. The hack I implemented for this request requires surrounding the string with non-space characters.
Please feel free to provide better ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

@ Client / Controls / Input Feature ✨ PRs that add or enhance a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants