aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-03-12 19:40:16 +0100
committerMichael Albinus2019-03-12 19:40:16 +0100
commit3ec05e1c3b4c46cf48e7039175d96596dd4b94be (patch)
tree97306597656a15e6a3864a4989553f5de02452de
parentaa1a4cceca2d93d83c721ce83950230739073727 (diff)
downloademacs-3ec05e1c3b4c46cf48e7039175d96596dd4b94be.tar.gz
emacs-3ec05e1c3b4c46cf48e7039175d96596dd4b94be.zip
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
Use proper range when deleting the region.
-rw-r--r--lisp/net/tramp-adb.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 33ff4ccacee..632ad12667d 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -1011,7 +1011,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
1011 ;; order to cleanup the prompt afterwards. 1011 ;; order to cleanup the prompt afterwards.
1012 (tramp-adb-maybe-open-connection v) 1012 (tramp-adb-maybe-open-connection v)
1013 (widen) 1013 (widen)
1014 (delete-region mark (point)) 1014 (delete-region mark (point-max))
1015 (narrow-to-region (point-max) (point-max)) 1015 (narrow-to-region (point-max) (point-max))
1016 ;; Send the command. 1016 ;; Send the command.
1017 (let* ((p (tramp-get-connection-process v)) 1017 (let* ((p (tramp-get-connection-process v))
@@ -1127,12 +1127,14 @@ This happens for Android >= 4.0."
1127 (tramp-adb-maybe-open-connection vec) 1127 (tramp-adb-maybe-open-connection vec)
1128 (tramp-message vec 6 "%s" command) 1128 (tramp-message vec 6 "%s" command)
1129 (tramp-send-string vec command) 1129 (tramp-send-string vec command)
1130 ;; fixme: Race condition 1130 ;; FIXME: Race condition.
1131 (tramp-adb-wait-for-output (tramp-get-connection-process vec)) 1131 (tramp-adb-wait-for-output (tramp-get-connection-process vec))
1132 (with-current-buffer (tramp-get-connection-buffer vec) 1132 (with-current-buffer (tramp-get-connection-buffer vec)
1133 (save-excursion 1133 (save-excursion
1134 (goto-char (point-min)) 1134 (goto-char (point-min))
1135 ;; We can't use stty to disable echo of command. 1135 ;; We can't use stty to disable echo of command. stty is said
1136 ;; to be added to toybox 0.7.6. busybox shall have it, but this
1137 ;; isn't used any longer for Android.
1136 (delete-matching-lines (regexp-quote command)) 1138 (delete-matching-lines (regexp-quote command))
1137 ;; When the local machine is W32, there are still trailing ^M. 1139 ;; When the local machine is W32, there are still trailing ^M.
1138 ;; There must be a better solution by setting the correct coding 1140 ;; There must be a better solution by setting the correct coding