Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 30 Mar 2014 21:51:36 UTC Commit: f699aea96cb0f297caf8aa2feb6ba68db51ec77b https://github.com/geany/geany-plugins/commit/f699aea96cb0f297caf8aa2feb6ba6...
Log Message: ----------- pohelper: Fallback to a sane default if line break column is too small
There is no point in breaking at a too small column, and the code don't properly handle length smaller than 2 anyway. So, use 72 as the default if the configured line break column has a crazily small value (less than 8).
Modified Paths: -------------- pohelper/src/gph-plugin.c
Modified: pohelper/src/gph-plugin.c 5 files changed, 5 insertions(+), 0 deletions(-) =================================================================== @@ -789,6 +789,11 @@ enum { gint line_len = geany_data->editor_prefs->line_break_column; gint msgstr_kw_len;
+ /* if line break column doesn't have a reasonable value, don't use it */ + if (line_len < 8) { + line_len = 72; + } + sci_start_undo_action (sci); scintilla_send_message (sci, SCI_DELETERANGE, (uptr_t) start, end + 1 - start);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).