[gedit-plugins] findinfiles: use g_utf8_make_valid()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] findinfiles: use g_utf8_make_valid()
- Date: Wed, 6 Nov 2019 13:18:03 +0000 (UTC)
commit c1efa4e18e92fe1c5d7a79e9915a9f59f287a3bf
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Nov 6 14:09:44 2019 +0100
findinfiles: use g_utf8_make_valid()
gedit_utils_make_valid_utf8() is deprecated.
plugins/findinfiles/job.vala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/plugins/findinfiles/job.vala b/plugins/findinfiles/job.vala
index a968f93..fe846a9 100644
--- a/plugins/findinfiles/job.vala
+++ b/plugins/findinfiles/job.vala
@@ -129,7 +129,8 @@ class FindJob {
public string extract_context (uint8 *buffer, Range range) {
uint8 *slice = new uint8[range.to - range.from];
Posix.memcpy (slice, buffer + range.from, range.to - range.from);
- return Gedit.utils_make_valid_utf8 ((string)slice);
+ string slice_str = (string)slice;
+ return slice_str.make_valid();
}
public void halt () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]