From 13b5e1f14948b3d04d69fcf1570aafc256712dfc Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 27 Feb 1996 21:06:03 +0000 Subject: [PATCH] Fix bug: code to determine when the user begins typing a new file name at the end of a file prompt must match the inserted file name in its entirety; previously it could mistakenly match against a substring of the inserted file name. --- v7/src/edwin/dosfile.scm | 5 +++-- v7/src/edwin/unix.scm | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/v7/src/edwin/dosfile.scm b/v7/src/edwin/dosfile.scm index dcc0e7c52..000280131 100644 --- a/v7/src/edwin/dosfile.scm +++ b/v7/src/edwin/dosfile.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: dosfile.scm,v 1.4 1995/10/25 03:49:29 cph Exp $ +;;; $Id: dosfile.scm,v 1.5 1996/02/27 21:06:03 cph Exp $ ;;; -;;; Copyright (c) 1994-95 Massachusetts Institute of Technology +;;; Copyright (c) 1994-96 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -90,6 +90,7 @@ Includes the new backup. Must be > 0." (define (os/trim-pathname-string string prefix) (let ((index (string-match-forward prefix string))) (if (and index + (fix:= index (string-length prefix)) (re-match-substring-forward (re-compile-pattern "[\\/$~]\\|[a-zA-Z]:" #t) #t #f string index (string-length string))) diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index 7b812079d..ac72d8359 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: unix.scm,v 1.61 1995/10/25 02:18:34 cph Exp $ +;;; $Id: unix.scm,v 1.62 1996/02/27 21:05:56 cph Exp $ ;;; -;;; Copyright (c) 1989-95 Massachusetts Institute of Technology +;;; Copyright (c) 1989-96 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -91,6 +91,7 @@ Includes the new backup. Must be > 0." (define (os/trim-pathname-string string prefix) (let ((index (string-match-forward prefix string))) (if (and index + (fix:= index (string-length prefix)) (re-match-substring-forward (re-compile-pattern "[/$~]" #t) #t #f string index (string-length string))) -- 2.25.1