[Github-comments] [geany/geany] Improve auto close (#2943)

elextr notifications at xxxxx
Sat Oct 16 01:44:30 UTC 2021


@elextr commented on this pull request.



> +				isAutoClosed = TRUE;
+			break;
+		case '\'':
+			if (editor_prefs.autoclose_chars & GEANY_AC_SQUOTE)
+				isAutoClosed = TRUE;
+			break;
+		case '"':
+			if (editor_prefs.autoclose_chars & GEANY_AC_DQUOTE)
+				isAutoClosed = TRUE;
+			break;
+	}
+
+	gchar cNext = sci_get_char_at( sci, pos);
+
+	if( isAutoClosed && cNext == c ) {
+		sci_delete_range(sci, pos, 1);

Nice thought, but then anywhere a user types `)` before `)` it won't be inserted.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2943#discussion_r730192491
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211015/1fa14eaa/attachment.htm>


More information about the Github-comments mailing list