mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Merge from savannah/emacs-30
2d5cf22818Fix clipboard object handle leak on Android 3.1 to 11.0b6b4a080a3Only disable 'completion-preview-active-mode' when it is on
This commit is contained in:
commit
a07465410a
2 changed files with 19 additions and 9 deletions
|
|
@ -615,14 +615,18 @@ point, otherwise hide it."
|
||||||
(cancel-timer completion-preview--timer)
|
(cancel-timer completion-preview--timer)
|
||||||
(setq completion-preview--timer nil))
|
(setq completion-preview--timer nil))
|
||||||
|
|
||||||
;; If we're called after a command that itself updates the
|
(cond
|
||||||
;; preview, don't do anything.
|
(internal-p
|
||||||
(unless internal-p
|
;; `this-command' took care of updating the preview. Do nothing.
|
||||||
(if (and (completion-preview-require-certain-commands)
|
)
|
||||||
(completion-preview-require-minimum-symbol-length)
|
((and (completion-preview-require-certain-commands)
|
||||||
(not buffer-read-only))
|
(completion-preview-require-minimum-symbol-length)
|
||||||
(completion-preview--show)
|
(not buffer-read-only))
|
||||||
(completion-preview-active-mode -1)))))
|
;; All conditions met. Show or update the preview.
|
||||||
|
(completion-preview--show))
|
||||||
|
(completion-preview-active-mode
|
||||||
|
;; The preview is shown, but it shouldn't be. Hide it.
|
||||||
|
(completion-preview-active-mode -1)))))
|
||||||
|
|
||||||
(defun completion-preview--barf-if-no-preview ()
|
(defun completion-preview--barf-if-no-preview ()
|
||||||
"Signal a `user-error' if completion preview is not active."
|
"Signal a `user-error' if completion preview is not active."
|
||||||
|
|
|
||||||
|
|
@ -418,7 +418,10 @@ close_asset_fd (void *afd)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the offset, file descriptor and length of the data contained
|
/* Return the offset, file descriptor and length of the data contained
|
||||||
in the asset file descriptor AFD, in *FD, *OFFSET, and *LENGTH.
|
in the asset file descriptor AFD, in *FD, *OFFSET, and *LENGTH. AFD
|
||||||
|
will not be released if an exception is detected; it is the
|
||||||
|
responsibility of the caller to arrange that it be.
|
||||||
|
|
||||||
Value is 0 upon success, 1 otherwise. */
|
Value is 0 upon success, 1 otherwise. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
@ -487,6 +490,9 @@ extract_fd_offsets (jobject afd, int *fd, jlong *offset, jlong *length)
|
||||||
*fd = (*android_java_env)->CallIntMethod (android_java_env,
|
*fd = (*android_java_env)->CallIntMethod (android_java_env,
|
||||||
java_fd,
|
java_fd,
|
||||||
fd_class.get_fd);
|
fd_class.get_fd);
|
||||||
|
android_exception_check_1 (java_fd);
|
||||||
|
ANDROID_DELETE_LOCAL_REF (java_fd);
|
||||||
|
|
||||||
if (*fd >= 0)
|
if (*fd >= 0)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue