patch 9.0.0590: after exiting Insert mode spelling not checked in next line

Problem:    After exiting Insert mode spelling is not checked in the next
            line.
Solution:   When spelling is enabled redraw the next line after exiting Insert
            mode in case the spell highlight needs updating.
diff --git a/src/testdir/dumps/Test_spell_3.dump b/src/testdir/dumps/Test_spell_3.dump
new file mode 100644
index 0000000..8dcd045
--- /dev/null
+++ b/src/testdir/dumps/Test_spell_3.dump
@@ -0,0 +1,8 @@
+| +0&#ffffff0@2|T|h|i|s| |l|i|n|e| |h|a|s| |a| |s+0&#ffd7d7255|e|p|l@1| +0&#ffffff0|e|r@1|o|r|.| |a+0&#5fd7ff255|n|d| +0&#ffffff0|m|i|s@1|i|n|g| |c|a|p|s| |a|n|d| |t|r|a|i|l|i|n|g| |s|p|a|c|e|s|.| @5
+|a+0&#5fd7ff255|n|o|t|h|e|r| +0&#ffffff0|m|i|s@1|i|n|g| |c|a|p| |h|e|r|e|.| @49
+|N|o>t| @71
+|a|n|d| |h|e|r|e|.| @65
+@75
+|a+0&#5fd7ff255|n|d| +0&#ffffff0|h|e|r|e|.| @65
+|~+0#4040ff13&| @73
+| +0#0000000&@56|3|,|3| @10|A|l@1| 
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index 3ea9aff..90c6d53 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -983,6 +983,10 @@
   let buf = RunVimInTerminal('-S XtestSpellCap', {'rows': 8})
   call VerifyScreenDump(buf, 'Test_spell_2', {})
 
+  " After adding word missing Cap in next line is updated
+  call term_sendkeys(buf, "3GANot\<Esc>")
+  call VerifyScreenDump(buf, 'Test_spell_3', {})
+
   " clean up
   call StopVimInTerminal(buf)
   call delete('XtestSpellCap')