Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann committed Nov 11, 2023
1 parent d5be23a commit 301d0cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/core/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def filename_to_uri(file_name: str) -> str:
def view_to_uri(view: sublime.View) -> str:
file_name = view.file_name()
if not file_name:
return "buffer://{}".format(view.buffer_id())
return "buffer:{}".format(view.buffer_id())
return filename_to_uri(file_name)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_url.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def test_buffer_uri(self):
view.file_name = unittest.mock.MagicMock(return_value=None)
view.buffer_id = unittest.mock.MagicMock(return_value=42)
uri = view_to_uri(view)
self.assertEqual(uri, "buffer://42")
self.assertEqual(uri, "buffer:42")

0 comments on commit 301d0cc

Please sign in to comment.