バグ #1546 » 0002-fix-url-range-after-emoji.patch
plugin/gtk3/widget/miraclepainter.rb | ||
---|---|---|
233 | 233 |
index = main_pos_to_index(x, y) |
234 | 234 |
if index |
235 | 235 |
clicked_note = score.find{|note| |
236 |
index -= note.description.size |
|
236 |
if UserConfig[:miraclepainter_expand_custom_emoji] && note.respond_to?(:inline_photo) |
|
237 |
# 1 -> 置換された絵文字の文字長 |
|
238 |
index -= 1 |
|
239 |
else |
|
240 |
index -= note.description.size |
|
241 |
end |
|
237 | 242 |
index < 0 |
238 | 243 |
} |
239 | 244 |
Plugin.call(:open, clicked_note) if clickable?(clicked_note) |
... | ... | |
674 | 679 |
index = main_pos_to_index(x, y) |
675 | 680 |
if index # the cursor is placed on text |
676 | 681 |
pointed_note = score.find{|note| |
677 |
index -= note.description.size |
|
682 |
if UserConfig[:miraclepainter_expand_custom_emoji] && note.respond_to?(:inline_photo) |
|
683 |
# 1 -> 置換された絵文字の文字長 |
|
684 |
index -= 1 |
|
685 |
else |
|
686 |
index -= note.description.size |
|
687 |
end |
|
678 | 688 |
index < 0 |
679 | 689 |
} |
680 | 690 |
if clickable?(pointed_note) |