Skip to content

Commit

Permalink
fix: remove unneeded viewport cursor wrap behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan-hm committed Feb 6, 2022
1 parent 9b8d2d4 commit 26a14c6
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions lib/overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,6 @@ def update_overlay(cls, context, event, x_offset=400, lines=1):
cls.overlay_x = context.region.width - x_offset
cls.overlay_y = 45 + (lines * cls.line_spacer)

region_buffer = 5

if event.mouse_region_x <= 0:
context.window.cursor_warp(context.region.width + cls.region_offset_x - region_buffer, event.mouse_y)

if event.mouse_region_x >= context.region.width - 1:
context.window.cursor_warp(cls.region_offset_x + region_buffer, event.mouse_y)

if event.mouse_region_y <= 0:
context.window.cursor_warp(event.mouse_x, context.region.height + cls.region_offset_y - region_buffer)

if event.mouse_region_y >= context.region.height - 1:
context.window.cursor_warp(event.mouse_x, cls.region_offset_y + region_buffer)

redraw_regions()


Expand Down

0 comments on commit 26a14c6

Please sign in to comment.