runtime(vimtutor): Add a second chapter
fixes: #5719
closes: #5729
Signed-off-by: Paul Desmond Parker <pauldesmondparker@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/tutor/tutor.vim b/runtime/tutor/tutor.vim
index 809fd1d..551231a 100644
--- a/runtime/tutor/tutor.vim
+++ b/runtime/tutor/tutor.vim
@@ -180,8 +180,13 @@
let s:ext .= '.utf-8'
endif
-" 2. Build the name of the file:
-let s:tutorfile = "/tutor/tutor"
+" 2. Build the name of the file and chapter
+let s:chapter = exists("$CHAPTER") ? $CHAPTER : ''
+if s:chapter == "1"
+ let s:chapter = ''
+endif
+
+let s:tutorfile = "/tutor/tutor" . s:chapter
let s:tutorxx = $VIMRUNTIME . s:tutorfile . s:ext
" 3. Finding the file: