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

Fix editor search/replace feedback when replacing markup #3496

Merged
merged 1 commit into from Apr 27, 2024

Conversation

chiizujin
Copy link
Contributor

Brief overview of PR changes/additions

When using the search/replace function in the editor, the feedback message displays incorrectly if markup is involved.

Motivation for adding to Evennia

Bug fix.

Other info

Before

>:
----------Line Editor [topic test]--------------------------------------------
01| A line with |rred text|n in it.
----------[l:01 w:007 c:0031]------------(:h for help)------------------------
>:s \|r |b
Search-replaced \ ->  for lines 1-1.

In the above message, -> is displayed in red and for lines 1-1. is displayed in blue. The message also doesn't reflect what was changed since the markup has been replaced with ANSI codes.

>:
----------Line Editor [topic test]--------------------------------------------
01| A line with |bred text|n in it.
----------[l:01 w:007 c:0031]------------(:h for help)------------------------

After

>:
----------Line Editor [topic test]--------------------------------------------
01| A line with |rred text|n in it.
----------[l:01 w:007 c:0031]------------(:h for help)------------------------
>:s \|r |b
Search-replaced \|r -> |b for lines 1-1.

There are no colours in the message and it correctly reflects what the change was.

>:
----------Line Editor [topic test]--------------------------------------------
01| A line with |bred text|n in it.
----------[l:01 w:007 c:0031]------------(:h for help)------------------------

The other code path (line range specified):

>:s 1:1 \|b |r
Search-replaced \|b -> |r for line 1.

Correct, with no colours.

Copy link
Member

@Griatch Griatch left a comment

Choose a reason for hiding this comment

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

Good catch and improvement!

@Griatch Griatch merged commit 18799d2 into evennia:main Apr 27, 2024
7 of 10 checks passed
@chiizujin chiizujin deleted the editor_search_message branch April 28, 2024 01:44
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