Skip to content

tp.file.cursor() No Longer Working After Update #795

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

Open
GevatterWolf opened this issue Mar 22, 2025 · 1 comment
Open

tp.file.cursor() No Longer Working After Update #795

GevatterWolf opened this issue Mar 22, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@GevatterWolf
Copy link

Describe the bug
Since updating Templater to version 1.13.2, the tp.file.cursor() function no longer works as intended. Previously, using the following template code would place the cursor at a designated position and automatically focus the editor:

<% tp.file.cursor() %><%* app.workspace.activeLeaf.view.editor?.focus(); %>

After the update:

  • The placeholder <% tp.file.cursor() %> remains visible as plain text in the inserted template.
  • The cursor does not move to the specified position.

Unlike initially thought, the issue is not related to Templater. If I create a file in the intended folder directly the function executes without issues.

Expected behavior

  • The <% tp.file.cursor() %> placeholder should not appear in the final inserted text.
  • The cursor should automatically move to the position defined by tp.file.cursor().
  • The editor should focus at the cursor's new position.

Desktop (please complete the following information):

  • OS: macOS Sequoia 15.3.2 (24D81)
  • Obsidian Version: 1.8.9
  • Templater Version: 2.10.0

Additional context

  • "Automatic jump to cursor" is enabled in the Templater settings.
  • Other QuickAdd functions work correctly.
  • Disabling other plugins did not resolve the issue.
@GevatterWolf GevatterWolf added the bug Something isn't working label Mar 22, 2025
@carterscottm
Copy link

Looks like this started with 1.13.1. I reverted back to 1.13.0 and the problem went away.

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

2 participants