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

Uparrow/downarrow in console autofills sent messages. #513

Merged
merged 5 commits into from May 24, 2020

Conversation

MasterBel2
Copy link
Contributor

@MasterBel2 MasterBel2 commented May 10, 2020

The console maintains an index (sentMessageIndex) where index == 1 refers to the message being typed, and index >= 2 refers to previously sent messages. Messages are inserted at index == 2 after send (excluding adjacent duplicates). Uparrow/downarrow adjusts the index and fills the new index's corresponding value. There is no limit to the number of stored sent messages.

Also replaced Console.MessageListener with Console.sendMessageActions.default /.ircStyle for reduced code duplication.

This addresses #250

The console maintains an index where index == 1 refers to the message being typed, and index >= 2 refers to previously sent messages. Messages are inserted at index == 2 after send (excluding adjacent duplicates). Uparrow/downarrow adjusts the index and fills the new index's corresponding value. There is no limit to the number of stored sent messages.

Also replaced Console.MessageListener with Console.sendMessageActions.default /.ircStyle for reduced code duplication.
@MasterBel2
Copy link
Contributor Author

Force-push fixed 4 trailing whitespaces, as flagged by Travis

LuaMenu/widgets/chobby/components/chat_windows.lua Outdated Show resolved Hide resolved
LuaMenu/widgets/chobby/components/chat_windows.lua Outdated Show resolved Hide resolved
LuaMenu/widgets/chobby/components/console.lua Outdated Show resolved Hide resolved
LuaMenu/widgets/chobby/components/console.lua Show resolved Hide resolved
 - Revert `MessageListener` changes. For future discusion/its own PR.
 - Console updates sentMessageIndex on TAB and sending messages.
 - Fixed inconsistent spacing
 - Fixed extraneous line due to copy-paste
@gajop gajop merged commit fabcd6d into Spring-Chobby:master May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants