Skip to content

Conversation

@ultronozm
Copy link
Contributor

Add widen calls to handle narrowed buffers correctly.

  • overleaf.el (overleaf--buffer-string): New function to get buffer
    contents with widening and no text properties.

(overleaf--save-context, overleaf--parse-message)
(overleaf--send-position-update, overleaf--row-col-to-pos)
(overleaf--format-user-info, xref-location-line)
(overleaf--apply-changes-internal, overleaf--reset-buffer-to): Add
save-restriction and widen calls.

(overleaf--write-buffer-variables): Wrap file-local variable
operations in save-excursion and save-restriction.

(overleaf--get-hash, overleaf--push-to-history)
(overleaf--verify-buffer, overleaf--extract-context-at-point)
(overleaf--apply-changes, overleaf--after-change-function)
(overleaf--before-change-function, overleaf--reset-edit-queue)
(overleaf--flush-edit-queue, overleaf-queue-current-change): Use
overleaf--buffer-string.

Add widen calls to handle narrowed buffers correctly.

* overleaf.el (overleaf--buffer-string): New function to get buffer
contents with widening and no text properties.

(overleaf--save-context, overleaf--parse-message)
(overleaf--send-position-update, overleaf--row-col-to-pos)
(overleaf--format-user-info, xref-location-line)
(overleaf--apply-changes-internal, overleaf--reset-buffer-to): Add
save-restriction and widen calls.

(overleaf--write-buffer-variables): Wrap file-local variable
operations in save-excursion and save-restriction.

(overleaf--get-hash, overleaf--push-to-history)
(overleaf--verify-buffer, overleaf--extract-context-at-point)
(overleaf--apply-changes, overleaf--after-change-function)
(overleaf--before-change-function, overleaf--reset-edit-queue)
(overleaf--flush-edit-queue, overleaf-queue-current-change): Use
overleaf--buffer-string.
@vale981 vale981 merged commit 5c05f45 into vale981:main Jun 23, 2025
1 check passed
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.

2 participants