mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 19:10:24 +00:00
Rename merge_transaction_into
to merge_transactions
This commit is contained in:
parent
9674b03855
commit
71a5964c18
4 changed files with 9 additions and 18 deletions
|
@ -193,7 +193,7 @@ impl RefactoringAssistant {
|
|||
if let Some(transaction) = buffer.end_transaction(cx) {
|
||||
if let Some(first_transaction) = first_transaction {
|
||||
// Group all assistant edits into the first transaction.
|
||||
buffer.merge_transaction_into(
|
||||
buffer.merge_transactions(
|
||||
transaction,
|
||||
first_transaction,
|
||||
cx,
|
||||
|
|
|
@ -615,7 +615,7 @@ impl MultiBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn merge_transaction_into(
|
||||
pub fn merge_transactions(
|
||||
&mut self,
|
||||
transaction: TransactionId,
|
||||
destination: TransactionId,
|
||||
|
@ -623,7 +623,7 @@ impl MultiBuffer {
|
|||
) {
|
||||
if let Some(buffer) = self.as_singleton() {
|
||||
buffer.update(cx, |buffer, _| {
|
||||
buffer.merge_transaction_into(transaction, destination)
|
||||
buffer.merge_transactions(transaction, destination)
|
||||
});
|
||||
} else {
|
||||
if let Some(transaction) = self.history.remove_transaction(transaction) {
|
||||
|
@ -634,7 +634,7 @@ impl MultiBuffer {
|
|||
{
|
||||
if let Some(state) = self.buffers.borrow().get(&buffer_id) {
|
||||
state.buffer.update(cx, |buffer, _| {
|
||||
buffer.merge_transaction_into(
|
||||
buffer.merge_transactions(
|
||||
buffer_transaction_id,
|
||||
*destination_buffer_transaction_id,
|
||||
)
|
||||
|
|
|
@ -1294,12 +1294,8 @@ impl Buffer {
|
|||
self.text.forget_transaction(transaction_id);
|
||||
}
|
||||
|
||||
pub fn merge_transaction_into(
|
||||
&mut self,
|
||||
transaction: TransactionId,
|
||||
destination: TransactionId,
|
||||
) {
|
||||
self.text.merge_transaction_into(transaction, destination);
|
||||
pub fn merge_transactions(&mut self, transaction: TransactionId, destination: TransactionId) {
|
||||
self.text.merge_transactions(transaction, destination);
|
||||
}
|
||||
|
||||
pub fn wait_for_edits(
|
||||
|
|
|
@ -310,7 +310,7 @@ impl History {
|
|||
Some(&mut entry.transaction)
|
||||
}
|
||||
|
||||
fn merge_transaction_into(&mut self, transaction: TransactionId, destination: TransactionId) {
|
||||
fn merge_transactions(&mut self, transaction: TransactionId, destination: TransactionId) {
|
||||
if let Some(transaction) = self.forget(transaction) {
|
||||
if let Some(destination) = self.transaction_mut(destination) {
|
||||
destination.edit_ids.extend(transaction.edit_ids);
|
||||
|
@ -1225,13 +1225,8 @@ impl Buffer {
|
|||
self.history.forget(transaction_id);
|
||||
}
|
||||
|
||||
pub fn merge_transaction_into(
|
||||
&mut self,
|
||||
transaction: TransactionId,
|
||||
destination: TransactionId,
|
||||
) {
|
||||
self.history
|
||||
.merge_transaction_into(transaction, destination);
|
||||
pub fn merge_transactions(&mut self, transaction: TransactionId, destination: TransactionId) {
|
||||
self.history.merge_transactions(transaction, destination);
|
||||
}
|
||||
|
||||
pub fn redo(&mut self) -> Option<(TransactionId, Operation)> {
|
||||
|
|
Loading…
Reference in a new issue