Merge branch 'nohand' of https://github.com/derekschrock/kitty
Also add a changelog entry and some stylistic fixes
This commit is contained in:
commit
d13ad4ec4b
@ -23,6 +23,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
|
|||||||
- Wayland: Fix key repeat being stopped by the release of an unrelated key
|
- Wayland: Fix key repeat being stopped by the release of an unrelated key
|
||||||
(:iss:`2191`)
|
(:iss:`2191`)
|
||||||
|
|
||||||
|
- Add an :opt:`detect_urls` to control whether kitty will detect URLs when the
|
||||||
|
mouse moves over them (:pull:`3118`)
|
||||||
|
|
||||||
|
|
||||||
0.19.2 [2020-11-13]
|
0.19.2 [2020-11-13]
|
||||||
-------------------
|
-------------------
|
||||||
|
|||||||
@ -520,6 +520,11 @@ def url_prefixes(x: str) -> Tuple[str, ...]:
|
|||||||
o('url_prefixes', 'http https file ftp', option_type=url_prefixes, long_text=_('''
|
o('url_prefixes', 'http https file ftp', option_type=url_prefixes, long_text=_('''
|
||||||
The set of URL prefixes to look for when detecting a URL under the mouse cursor.'''))
|
The set of URL prefixes to look for when detecting a URL under the mouse cursor.'''))
|
||||||
|
|
||||||
|
o('detect_urls', True, long_text=_('''
|
||||||
|
Detect URLs under the mouse. Detected URLs are highlighted
|
||||||
|
with an underline and the mouse cursor becomes a hand over them.
|
||||||
|
Even if this option is disabled, URLs are still clickable.'''))
|
||||||
|
|
||||||
|
|
||||||
def copy_on_select(raw: str) -> str:
|
def copy_on_select(raw: str) -> str:
|
||||||
q = raw.lower()
|
q = raw.lower()
|
||||||
|
|||||||
@ -368,7 +368,7 @@ HANDLER(handle_move_event) {
|
|||||||
bool in_left_half_of_cell = false;
|
bool in_left_half_of_cell = false;
|
||||||
if (!cell_for_pos(w, &x, &y, &in_left_half_of_cell, global_state.callback_os_window)) return;
|
if (!cell_for_pos(w, &x, &y, &in_left_half_of_cell, global_state.callback_os_window)) return;
|
||||||
Screen *screen = w->render_data.screen;
|
Screen *screen = w->render_data.screen;
|
||||||
detect_url(screen, x, y);
|
if(OPT(detect_urls)) detect_url(screen, x, y);
|
||||||
bool mouse_cell_changed = x != w->mouse_pos.cell_x || y != w->mouse_pos.cell_y;
|
bool mouse_cell_changed = x != w->mouse_pos.cell_x || y != w->mouse_pos.cell_y;
|
||||||
bool cell_half_changed = in_left_half_of_cell != w->mouse_pos.in_left_half_of_cell;
|
bool cell_half_changed = in_left_half_of_cell != w->mouse_pos.in_left_half_of_cell;
|
||||||
w->mouse_pos.cell_x = x; w->mouse_pos.cell_y = y;
|
w->mouse_pos.cell_x = x; w->mouse_pos.cell_y = y;
|
||||||
|
|||||||
@ -705,6 +705,7 @@ PYWRAP1(set_options) {
|
|||||||
S(pointer_shape_when_grabbed, pointer_shape);
|
S(pointer_shape_when_grabbed, pointer_shape);
|
||||||
S(default_pointer_shape, pointer_shape);
|
S(default_pointer_shape, pointer_shape);
|
||||||
S(pointer_shape_when_dragging, pointer_shape);
|
S(pointer_shape_when_dragging, pointer_shape);
|
||||||
|
S(detect_urls, PyObject_IsTrue);
|
||||||
|
|
||||||
GA(tab_bar_style);
|
GA(tab_bar_style);
|
||||||
global_state.tab_bar_hidden = PyUnicode_CompareWithASCIIString(ret, "hidden") == 0 ? true: false;
|
global_state.tab_bar_hidden = PyUnicode_CompareWithASCIIString(ret, "hidden") == 0 ? true: false;
|
||||||
|
|||||||
@ -72,6 +72,7 @@ typedef struct {
|
|||||||
UrlPrefix *values;
|
UrlPrefix *values;
|
||||||
size_t num, max_prefix_len;
|
size_t num, max_prefix_len;
|
||||||
} url_prefixes;
|
} url_prefixes;
|
||||||
|
bool detect_urls;
|
||||||
} Options;
|
} Options;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user