Skip to content

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Dec 10, 2025

  1. Our textarea already has some editor-like feature like tab indentation, so I thought why not also add insertion of matching closing quotes/brackets over selected text. This does that.
  2. textareaInsertText is replaced with replaceTextareaSelection which does the same but create a new edit history entry in the textarea so CTRL-Z works. The button that inserts tables into the textarea can now also be reverted via CTRL-Z, which was not possible before.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 10, 2025
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Dec 10, 2025
@silverwind
Copy link
Member Author

silverwind commented Dec 10, 2025

Backtick added as well. There is a catch with that key because it's a dead key on some keyboard and MDN specifies:

If the KeyboardEvent represents the press of a dead key, the key value must be "Dead".

So backtick will only work on keyboard layouts where it is not a dead key (e.g. NoDeadKeys layout).

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 10, 2025
@wxiaoguang wxiaoguang marked this pull request as draft December 10, 2025 05:39
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 10, 2025
@wxiaoguang wxiaoguang marked this pull request as ready for review December 10, 2025 06:25
@techknowlogick techknowlogick enabled auto-merge (squash) December 10, 2025 07:28
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 10, 2025
@techknowlogick techknowlogick merged commit ed698d1 into go-gitea:main Dec 10, 2025
23 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Dec 10, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Dec 10, 2025
@silverwind silverwind deleted the textareapairs branch December 10, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend type/enhancement An improvement of existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants