aboutsummaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'text.c')
-rw-r--r--text.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/text.c b/text.c
index be9a8f5..5f516bc 100644
--- a/text.c
+++ b/text.c
@@ -1185,6 +1185,14 @@ bool text_modified(Text *txt) {
return txt->saved_action != txt->history;
}
+bool text_sigbus(Text *txt, const char *addr) {
+ for (Buffer *buf = txt->buffers; buf; buf = buf->next) {
+ if (buf->type == MMAP && buf->data <= addr && addr < buf->data + buf->size)
+ return true;
+ }
+ return false;
+}
+
enum TextNewLine text_newline_type(Text *txt){
if (!txt->newlines) {
txt->newlines = TEXT_NEWLINE_NL; /* default to UNIX style \n new lines */