Skip to content

Commit 9c92ab8

Browse files
committed
solves #61
this change avoids giving zero as arg for byte-to-position (gives 1 instead)
1 parent 39f8d87 commit 9c92ab8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

phpactor.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@
347347
(set-buffer buf)
348348
(revert-buffer t t t))))
349349
(find-file path)
350-
(goto-char (1+ (byte-to-position offset))))
350+
(goto-char (1+ (byte-to-position (max 1 offset)))))
351351

352352
(cl-defun phpactor-action-close-file (&key path)
353353
"Close file from Phpactor."

0 commit comments

Comments
 (0)