updated for version 7.1-199
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 7d543f2..547f1a1 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4078,6 +4078,7 @@
 	     * ~ would be at the start of the file name, but not the tail.
 	     * $ could be anywhere in the tail.
 	     * ` could be anywhere in the file name.
+	     * When the name ends in '$' don't add a star, remove the '$'.
 	     */
 	    tail = gettail(retval);
 	    if ((*retval != '~' || tail != retval)
@@ -4085,6 +4086,8 @@
 		    && vim_strchr(tail, '$') == NULL
 		    && vim_strchr(retval, '`') == NULL)
 		retval[len++] = '*';
+	    else if (len > 0 && retval[len - 1] == '$')
+		--len;
 	    retval[len] = NUL;
 	}
     }