patch 8.1.1136: decoding of mouse click escape sequence is not tested

Problem:    Decoding of mouse click escape sequence is not tested.
Solution:   Add a test for xterm and SGR using low-level input.  Make
            low-level input execution with feedkeys() work.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index b79284c..7f8330f 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -3792,7 +3792,7 @@
 
 		if (!dangerous)
 		    ++ex_normal_busy;
-		exec_normal(TRUE, FALSE, TRUE);
+		exec_normal(TRUE, lowlevel, TRUE);
 		if (!dangerous)
 		    --ex_normal_busy;
 
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 88d03ee..e37fdfb 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -10487,12 +10487,15 @@
 exec_normal(int was_typed, int use_vpeekc, int may_use_terminal_loop UNUSED)
 {
     oparg_T	oa;
+    int		c;
 
+    // When calling vpeekc() from feedkeys() it will return Ctrl_C when there
+    // is nothing to get, so also check for Ctrl_C.
     clear_oparg(&oa);
     finish_op = FALSE;
     while ((!stuff_empty()
 		|| ((was_typed || !typebuf_typed()) && typebuf.tb_len > 0)
-		|| (use_vpeekc && vpeekc() != NUL))
+		|| (use_vpeekc && (c = vpeekc()) != NUL && c != Ctrl_C))
 	    && !got_int)
     {
 	update_topline_cursor();
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 81d0dc7..97cd166 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -250,6 +250,7 @@
 	test_taglist \
 	test_tcl \
 	test_termencoding \
+	test_termcodes \
 	test_terminal \
 	test_terminal_fail \
 	test_textformat \
@@ -402,6 +403,7 @@
 	test_tab.res \
 	test_tcl.res \
 	test_termencoding.res \
+	test_termcodes.res \
 	test_terminal.res \
 	test_terminal_fail.res \
 	test_textformat.res \
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
new file mode 100644
index 0000000..bd2729d
--- /dev/null
+++ b/src/testdir/test_termcodes.vim
@@ -0,0 +1,47 @@
+" Tests for decoding escape sequences sent by the terminal.
+
+" This only works for Unix in a terminal
+if has('gui_running') || !has('unix')
+  finish
+endif
+
+func Test_xterm_mouse_click()
+  new
+  let save_mouse = &mouse
+  let save_term = &term
+  let save_ttymouse = &ttymouse
+  set mouse=a
+  set term=xterm
+  call setline(1, ['line 1', 'line 2', 'line 3 is a bit longer'])
+  redraw
+
+  " Xterm mouse click
+  set ttymouse=xterm
+  let button = 0x20  " left down
+  let row = 2 + 32
+  let col = 6 + 32
+  call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+
+  let button = 0x23  " release
+  call feedkeys("\<Esc>[M" .. list2str([button, col, row]), 'Lx!')
+
+  call assert_equal([0, 2, 6, 0], getpos('.'))
+
+  " SGR mouse click
+  set ttymouse=sgr
+  let button = 0  " left down
+  let row = 3
+  let col = 9
+  call feedkeys(printf("\<Esc>[<%d;%d;%dM", button, col, row), 'Lx!')
+
+  let button = 3  " release
+  call feedkeys(printf("\<Esc>[<%d;%d;%dm", button, col, row), 'Lx!')
+
+  call assert_equal([0, 3, 9, 0], getpos('.'))
+
+  let &mouse = save_mouse
+  let &term = save_term
+  let &ttymouse = save_ttymouse
+  bwipe!
+endfunc
+
diff --git a/src/version.c b/src/version.c
index 0107b82..6b428b4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -772,6 +772,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1136,
+/**/
     1135,
 /**/
     1134,