diff options
| author | Po Lu | 2021-11-07 14:28:37 +0800 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-11-07 15:16:53 +0100 |
| commit | 73d17fd4b7877c893f0ca09c9f8f93ce66c7643a (patch) | |
| tree | d8707bef34c2f5337aed91cbc13b0fbee5188fac /src | |
| parent | 397bee1dc3d33d48abb3f6ab3483fa10b4d4ec1f (diff) | |
| download | emacs-73d17fd4b7877c893f0ca09c9f8f93ce66c7643a.tar.gz emacs-73d17fd4b7877c893f0ca09c9f8f93ce66c7643a.zip | |
Free find text in correct procedure
* src/xwidget.c (Fxwidget_webkit_previous_result): Don't free find
text.
(Fxwidget_webkit_finish_search): Free find text here instead.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xwidget.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/xwidget.c b/src/xwidget.c index b0700b61e54..f95f5f1d7f7 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -2025,12 +2025,6 @@ using `xwidget-webkit-search'. */) | |||
| 2025 | webview = WEBKIT_WEB_VIEW (xw->widget_osr); | 2025 | webview = WEBKIT_WEB_VIEW (xw->widget_osr); |
| 2026 | controller = webkit_web_view_get_find_controller (webview); | 2026 | controller = webkit_web_view_get_find_controller (webview); |
| 2027 | webkit_find_controller_search_previous (controller); | 2027 | webkit_find_controller_search_previous (controller); |
| 2028 | |||
| 2029 | if (xw->find_text) | ||
| 2030 | { | ||
| 2031 | xfree (xw->find_text); | ||
| 2032 | xw->find_text = NULL; | ||
| 2033 | } | ||
| 2034 | unblock_input (); | 2028 | unblock_input (); |
| 2035 | #endif | 2029 | #endif |
| 2036 | 2030 | ||
| @@ -2063,6 +2057,12 @@ using `xwidget-webkit-search'. */) | |||
| 2063 | webview = WEBKIT_WEB_VIEW (xw->widget_osr); | 2057 | webview = WEBKIT_WEB_VIEW (xw->widget_osr); |
| 2064 | controller = webkit_web_view_get_find_controller (webview); | 2058 | controller = webkit_web_view_get_find_controller (webview); |
| 2065 | webkit_find_controller_search_finish (controller); | 2059 | webkit_find_controller_search_finish (controller); |
| 2060 | |||
| 2061 | if (xw->find_text) | ||
| 2062 | { | ||
| 2063 | xfree (xw->find_text); | ||
| 2064 | xw->find_text = NULL; | ||
| 2065 | } | ||
| 2066 | unblock_input (); | 2066 | unblock_input (); |
| 2067 | #endif | 2067 | #endif |
| 2068 | 2068 | ||