patch 8.1.1466: not updating priority on existing sign

Problem:    Not updating priority on existing sign.
Solution:   Set the sign priority.  Add a test. (Yegappan Lakshmanan)
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index c095d58..21beaff 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -8597,7 +8597,7 @@
 			priority	sign priority
 
 		The returned signs in a buffer are ordered by their line
-		number.
+		number and priority.
 
 		Returns an empty list on failure or if there are no placed
 		signs.
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
index 4f59c8f..0903976 100644
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -182,9 +182,9 @@
 
 		By default, the sign is assigned a default priority of 10. To
 		assign a different priority value, use "priority={prio}" to
-		specify a value. The priority is used to determine the
-		highlight group used when multiple signs are placed on the
-		same line.
+		specify a value.  The priority is used to determine the sign
+		that is displayed when multiple signs are placed on the same
+		line.
 
 		Examples: >
 			:sign place 5 line=3 name=sign1 file=a.py
@@ -204,7 +204,9 @@
 		it (e.g., when the debugger has stopped at a breakpoint).
 
 		The optional "group={group}" attribute can be used before
-		"file=" to select a sign in a particular group.
+		"file=" to select a sign in a particular group.  The optional
+		"priority={prio}" attribute can be used to change the priority
+		of an existing sign.
 
 :sign place {id} name={name} [buffer={nr}]
 		Same, but use buffer {nr}.  If the buffer argument is not
diff --git a/src/sign.c b/src/sign.c
index b89bea0..8f1de4a 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -330,6 +330,7 @@
 	{
 	    // Update an existing sign
 	    sign->typenr = typenr;
+	    sign->priority = prio;
 	    return;
 	}
 	else if (lnum < sign->lnum)
diff --git a/src/testdir/test_signs.vim b/src/testdir/test_signs.vim
index 426998d..a986e12 100644
--- a/src/testdir/test_signs.vim
+++ b/src/testdir/test_signs.vim
@@ -1183,6 +1183,24 @@
 	      \ 'priority' : 10}],
 	      \ s[0].signs)
 
+  " Place multiple signs with same id on a line with different priority
+  call sign_place(1, '', 'sign1', 'Xsign',
+	      \ {'lnum' : 5, 'priority' : 20})
+  call sign_place(1, '', 'sign2', 'Xsign',
+	      \ {'lnum' : 5, 'priority' : 10})
+  let s = sign_getplaced('Xsign', {'lnum' : 5})
+  call assert_equal([
+	      \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
+	      \ 'priority' : 10}],
+	      \ s[0].signs)
+  call sign_place(1, '', 'sign2', 'Xsign',
+	      \ {'lnum' : 5, 'priority' : 5})
+  let s = sign_getplaced('Xsign', {'lnum' : 5})
+  call assert_equal([
+	      \ {'id' : 1, 'name' : 'sign2', 'lnum' : 5, 'group' : '',
+	      \ 'priority' : 5}],
+	      \ s[0].signs)
+
   " Error case
   call assert_fails("call sign_place(1, 'g1', 'sign1', 'Xsign',
 	      \ [])", 'E715:')
diff --git a/src/version.c b/src/version.c
index 6fcd057..7e64589 100644
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1466,
+/**/
     1465,
 /**/
     1464,