Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeByZach committed Sep 2, 2019
1 parent b8ee56f commit 93b9b9b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions color_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ def insert_color(self, target_color, convert=None, picker=False, alpha=False):
calc.calc()
value = target_color
if not is_replace:
self.view.sel().subtract(sels[0])
self.view.sel().add(calc.region)
self.view.sel().subtract(sels[0])
self.view.sel().add(calc.region)
self.view.run_command("insert", {"characters": value})
self.view.hide_popup()

Expand Down
38 changes: 19 additions & 19 deletions color_helper_picker.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,25 +96,25 @@ def get_color_map_square(self):
"check_size": check_size
}

if y == 0 and x == 0:
border_map = colorbox.TOP | colorbox.LEFT
elif y == 0 and x == 14:
border_map = colorbox.TOP | colorbox.RIGHT
elif y == 0:
border_map = colorbox.TOP
elif y == 10 and x == 0:
border_map = colorbox.BOTTOM | colorbox.LEFT
elif y == 10 and x == 14:
border_map = colorbox.BOTTOM | colorbox.RIGHT
elif y == 10:
border_map = colorbox.BOTTOM
elif x == 0:
border_map = colorbox.LEFT
elif x == 14:
border_map = colorbox.RIGHT
else:
border_map = 0
kwargs["border_map"] = border_map
if y == 0 and x == 0:
border_map = colorbox.TOP | colorbox.LEFT
elif y == 0 and x == 14:
border_map = colorbox.TOP | colorbox.RIGHT
elif y == 0:
border_map = colorbox.TOP
elif y == 10 and x == 0:
border_map = colorbox.BOTTOM | colorbox.LEFT
elif y == 10 and x == 14:
border_map = colorbox.BOTTOM | colorbox.RIGHT
elif y == 10:
border_map = colorbox.BOTTOM
elif x == 0:
border_map = colorbox.LEFT
elif x == 14:
border_map = colorbox.RIGHT
else:
border_map = 0
kwargs["border_map"] = border_map

html_colors[-1].append(
'<a href="%s">%s</a>' % (
Expand Down

0 comments on commit 93b9b9b

Please sign in to comment.