Skip to content

Fix vi-mode's visual rectangle region #1029

Merged
cxxxr merged 1 commit intolem-project:mainfrom
fukamachi:fix/vi-visual-block-region
Aug 30, 2023
Merged

Fix vi-mode's visual rectangle region #1029
cxxxr merged 1 commit intolem-project:mainfrom
fukamachi:fix/vi-visual-block-region

Conversation

@fukamachi
Copy link
Collaborator

Fix the vi-mode's visual block region when the cursor moves to right-top or left-bottom.

Comment on lines +100 to +108
(if (< end-column start-column)
;; left-top or left-bottom
(progn
(character-offset start 1)
(incf start-column))
;; right-top or right-bottom
(progn
(character-offset end 1)
(incf end-column)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible, cond would be better in these cases.

https://google.github.io/styleguide/lispguide.xml?showone=Conditional_Expressions#Conditional_Expressions

However, don't use PROGN for an IF clause — use COND, WHEN, or UNLESS.

@cxxxr cxxxr merged commit 99c4d44 into lem-project:main Aug 30, 2023
@cxxxr
Copy link
Member

cxxxr commented Aug 30, 2023

Thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants