This commit fixes an issue where buttons in the confirmation dialog
would not render properly when displaying multi-line messages.
Changes:
- Add dynamic positioning for buttons based on message length
- Calculate button row position based on the number of lines in the message
- Update focus_button function to accept custom row parameter
- Ensure highlights are applied at correct positions for varied message lengths
Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>
1. Split message into multiple lines using vim.split()
2. Apply indent to each line of the message using vim.tbl_map()
3. Improve code readability by using vim.iter() and chained methods
4. Simplify button line generation with string.rep()
Signed-off-by: Hanchin Hsieh <me@yuchanns.xyz>