irc: expand Send dialog input without allowing newlines
- Remove allow_newline; Enter triggers Send via is_enter_default. - Keep use_available_height + condensed to reduce scroll bars. Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
3
main.lua
3
main.lua
@@ -457,7 +457,7 @@ function IrcChatView:promptSendMessage()
|
|||||||
dialog = InputDialog:new{
|
dialog = InputDialog:new{
|
||||||
title = _("Send message"),
|
title = _("Send message"),
|
||||||
input = "",
|
input = "",
|
||||||
allow_newline = true, -- allow multiline input
|
-- Keep single-line input semantics on Enter, but expand the box
|
||||||
use_available_height = true, -- expand input to available height
|
use_available_height = true, -- expand input to available height
|
||||||
condensed = true, -- reduce extra padding to maximize text area
|
condensed = true, -- reduce extra padding to maximize text area
|
||||||
buttons = {
|
buttons = {
|
||||||
@@ -465,6 +465,7 @@ function IrcChatView:promptSendMessage()
|
|||||||
{
|
{
|
||||||
text = _("Send"),
|
text = _("Send"),
|
||||||
is_default = true,
|
is_default = true,
|
||||||
|
is_enter_default = true,
|
||||||
callback = function()
|
callback = function()
|
||||||
local txt = dialog:getInputText()
|
local txt = dialog:getInputText()
|
||||||
-- Update buffer/UI before closing dialog to ensure immediate repaint
|
-- Update buffer/UI before closing dialog to ensure immediate repaint
|
||||||
|
|||||||
Reference in New Issue
Block a user