Linux bluetooth development
 help / color / mirror / Atom feed
From: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
To: <linux-bluetooth@vger.kernel.org>
Cc: Jerzy Kasenberg <jerzy.kasenberg@tieto.com>
Subject: [PATCH 2/3] android: Fix error in draw line in haltest tool
Date: Fri, 18 Oct 2013 15:15:59 +0200	[thread overview]
Message-ID: <1382102160-21532-3-git-send-email-jerzy.kasenberg@tieto.com> (raw)
In-Reply-To: <1382102160-21532-1-git-send-email-jerzy.kasenberg@tieto.com>

This fixes small error that showed up when tab completion inserted
characters before end of line.
Cursor in line was not moved correctly.
---
 android/client/terminal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/client/terminal.c b/android/client/terminal.c
index 0421633..8dd3a25 100644
--- a/android/client/terminal.c
+++ b/android/client/terminal.c
@@ -140,7 +140,7 @@ void terminal_draw_command_line(void)
 		putchar('>');
 
 	/* move cursor to it's place */
-	terminal_move_cursor(line_len - line_buf_ix);
+	terminal_move_cursor(line_buf_ix - line_len);
 }
 
 /* inserts string into command line at cursor position */
-- 
1.7.9.5


  parent reply	other threads:[~2013-10-18 13:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18 13:15 [PATCH 0/3] Tab completion for haltest tool Jerzy Kasenberg
2013-10-18 13:15 ` [PATCH 1/3] android: Add tab completion to haltest Jerzy Kasenberg
2013-10-18 13:15 ` Jerzy Kasenberg [this message]
2013-10-18 13:16 ` [PATCH 3/3] android: Add completion for adapter " Jerzy Kasenberg
2013-10-18 13:51 ` [PATCH 0/3] Tab completion for haltest tool Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382102160-21532-3-git-send-email-jerzy.kasenberg@tieto.com \
    --to=jerzy.kasenberg@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox