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

Duplication bug when using Multiple Cursors #1453

Open
VerAn1015 opened this issue Sep 11, 2024 · 0 comments
Open

Duplication bug when using Multiple Cursors #1453

VerAn1015 opened this issue Sep 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@VerAn1015
Copy link

Plugin information

  • OS: Windows 10
  • Templater version: 2.7.1
  • Obsidian version: 1.6.7
  • Templater settings: [Template folder location: "Templates/"]

Describe the bug
I have set up a custom highlight with a CSS snippet and use % tp.file.selection() % with it. It works fine when used normally. The problem is when using multiple cursors which Obsidian supports natively. It duplicates the most recent selected text when applying the template with templater. More info below.

Template file content: <mark class="red"><% tp.file.selection() %></mark>

<mark class="red">highlight 5</mark>
<mark class="red">highlight 5</mark>
<mark class="red">highlight 5</mark>
<mark class="red">highlight 5</mark>
<mark class="red">highlight 5</mark>

Expected behavior
Does not duplicate the highlighted text when using the template with multiple cursors.

<mark class="red">highlight 1</mark>
<mark class="red">highlight 2</mark>
<mark class="red">highlight 3</mark>
<mark class="red">highlight 4</mark>
<mark class="red">highlight 5</mark>

Screenshots
Template File
image

Bug in action
Obsidian_yM8S1v7pa7

Additional context
Tested in Sandbox vault.

SYSTEM INFO:
Obsidian version: v1.6.7
Installer version: v1.6.7
Operating system: Windows 10 Home Single Language 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 1
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Templater v2.7.1

@VerAn1015 VerAn1015 added the bug Something isn't working label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant