<s>
A	O
gap	B-Data_Structure
buffer	I-Data_Structure
in	O
computer	B-General_Concept
science	I-General_Concept
is	O
a	O
dynamic	B-Data_Structure
array	I-Data_Structure
that	O
allows	O
efficient	O
insertion	O
and	O
deletion	O
operations	O
clustered	O
near	O
the	O
same	O
location	O
.	O
</s>
<s>
Gap	B-Data_Structure
buffers	I-Data_Structure
are	O
especially	O
common	O
in	O
text	B-Application
editors	I-Application
,	O
where	O
most	O
changes	O
to	O
the	O
text	O
occur	O
at	O
or	O
near	O
the	O
current	O
location	O
of	O
the	O
cursor	B-Application
.	O
</s>
<s>
Moving	O
the	O
cursor	B-Application
involves	O
copying	O
text	O
from	O
one	O
side	O
of	O
the	O
gap	O
to	O
the	O
other	O
(	O
sometimes	O
copying	O
is	O
delayed	O
until	O
the	O
next	O
operation	O
that	O
changes	O
the	O
text	O
)	O
.	O
</s>
<s>
Text	O
in	O
a	O
gap	B-Data_Structure
buffer	I-Data_Structure
is	O
represented	O
as	O
two	O
strings	O
,	O
which	O
take	O
very	O
little	O
extra	O
space	O
and	O
which	O
can	O
be	O
searched	O
and	O
displayed	O
very	O
quickly	O
,	O
compared	O
to	O
more	O
sophisticated	O
data	B-General_Concept
structures	I-General_Concept
such	O
as	O
linked	B-Data_Structure
lists	I-Data_Structure
.	O
</s>
<s>
The	O
use	O
of	O
gap	B-Data_Structure
buffers	I-Data_Structure
is	O
based	O
on	O
the	O
assumption	O
that	O
such	O
recopying	O
occurs	O
rarely	O
enough	O
that	O
its	O
cost	O
can	O
be	O
amortized	B-General_Concept
over	O
the	O
more	O
common	O
cheap	O
operations	O
.	O
</s>
<s>
This	O
makes	O
the	O
gap	B-Data_Structure
buffer	I-Data_Structure
a	O
simpler	O
alternative	O
to	O
the	O
rope	B-Data_Structure
for	O
use	O
in	O
text	B-Application
editors	I-Application
such	O
as	O
Emacs	B-Application
.	O
</s>
<s>
Below	O
are	O
some	O
examples	O
of	O
operations	O
with	O
buffer	B-Data_Structure
gaps	I-Data_Structure
.	O
</s>
<s>
User	O
moves	O
the	O
cursor	B-Application
before	O
"	O
started	O
"	O
;	O
system	O
moves	O
"	O
started	O
"	O
from	O
the	O
first	O
buffer	O
to	O
the	O
second	O
buffer	O
.	O
</s>
