You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-editors/gphpedit/files/gphpedit-0.9.91-empty-apply...

33 lines
834 B

--- src/tab.c 2006-08-27 14:29:01.000000000 -0500
+++ src/tab.c 2006-08-27 14:33:10.000000000 -0500
@@ -759,17 +759,21 @@
}
gtk_scintilla_get_text(GTK_SCINTILLA(editor->scintilla), text_length+1, buffer);
lines = g_strsplit(buffer, "\n", 10);
- if (lines[0][0] == '#' && lines[0][1] == '!' && strstr(lines[0], "php") != NULL) {
- is_php = TRUE;
- }
- else {
- for (i = 0; lines[i+1] != NULL; i++) {
- if (strstr (lines[i], "<?php") != NULL) {
- is_php = TRUE;
- break;
+
+ if (lines[0] != NULL) {
+ if (lines[0][0] == '#' && lines[0][1] == '!' && strstr(lines[0], "php") != NULL) {
+ is_php = TRUE;
+ }
+ else {
+ for (i = 0; lines[i+1] != NULL; i++) {
+ if (strstr (lines[i], "<?php") != NULL) {
+ is_php = TRUE;
+ break;
+ }
}
}
}
+
g_strfreev(lines);
}