diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/insdel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/insdel.c b/src/insdel.c index f5f56f0371f..7f10c2f523d 100644 --- a/src/insdel.c +++ b/src/insdel.c | |||
| @@ -1057,6 +1057,10 @@ insert_from_string (string, pos, pos_byte, length, length_byte, inherit) | |||
| 1057 | int inherit; | 1057 | int inherit; |
| 1058 | { | 1058 | { |
| 1059 | int opoint = PT; | 1059 | int opoint = PT; |
| 1060 | |||
| 1061 | if (SCHARS (string) == 0) | ||
| 1062 | return; | ||
| 1063 | |||
| 1060 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, | 1064 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, |
| 1061 | inherit, 0); | 1065 | inherit, 0); |
| 1062 | signal_after_change (opoint, 0, PT - opoint); | 1066 | signal_after_change (opoint, 0, PT - opoint); |
| @@ -1074,6 +1078,10 @@ insert_from_string_before_markers (string, pos, pos_byte, | |||
| 1074 | int inherit; | 1078 | int inherit; |
| 1075 | { | 1079 | { |
| 1076 | int opoint = PT; | 1080 | int opoint = PT; |
| 1081 | |||
| 1082 | if (SCHARS (string) == 0) | ||
| 1083 | return; | ||
| 1084 | |||
| 1077 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, | 1085 | insert_from_string_1 (string, pos, pos_byte, length, length_byte, |
| 1078 | inherit, 1); | 1086 | inherit, 1); |
| 1079 | signal_after_change (opoint, 0, PT - opoint); | 1087 | signal_after_change (opoint, 0, PT - opoint); |