mirror of
https://github.com/microsoft/edit.git
synced 2025-07-03 14:33:22 +00:00
Add copyright headers to all files
This commit is contained in:
parent
0c14eb58fb
commit
d17cf66c7c
46 changed files with 138 additions and 0 deletions
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::hint::black_box;
|
||||
use std::mem;
|
||||
|
||||
|
|
3
build.rs
3
build.rs
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
fn main() {
|
||||
#[cfg(windows)]
|
||||
if std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "windows" {
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Provides a transparent error type for edit.
|
||||
|
||||
use std::{io, result};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(clippy::missing_safety_doc, clippy::mut_from_ref)]
|
||||
|
||||
use std::alloc::{AllocError, Allocator, Layout};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Arena allocators. Small and fast.
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(clippy::mut_from_ref)]
|
||||
|
||||
use std::alloc::{AllocError, Allocator, Layout};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::fmt;
|
||||
use std::ops::{Bound, Deref, DerefMut, RangeBounds};
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Base64 facilities.
|
||||
|
||||
use crate::arena::ArenaString;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::collections::LinkedList;
|
||||
use std::ffi::OsStr;
|
||||
use std::fs::File;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use edit::framebuffer::IndexedColor;
|
||||
use edit::helpers::*;
|
||||
use edit::icu;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use edit::arena_format;
|
||||
use edit::helpers::*;
|
||||
use edit::input::{kbmod, vk};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use edit::framebuffer::{Attributes, IndexedColor};
|
||||
use edit::helpers::*;
|
||||
use edit::input::vk;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use edit::arena::scratch_arena;
|
||||
use edit::sys;
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![feature(let_chains, linked_list_cursors, os_string_truncate, string_from_utf8_lossy_owned)]
|
||||
|
||||
mod documents;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::ffi::{OsStr, OsString};
|
||||
use std::mem;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::ops::Range;
|
||||
use std::ptr::{self, NonNull};
|
||||
use std::slice;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! A text buffer for a text editor.
|
||||
//!
|
||||
//! Implements a Unicode-aware, layout-aware text buffer for terminals.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::ops::Range;
|
||||
|
||||
use crate::document::ReadableDocument;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! [`std::cell::RefCell`], but without runtime checks in release builds.
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Abstractions over reading/writing arbitrary text containers.
|
||||
|
||||
use std::ffi::OsString;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! A shoddy framebuffer for terminal applications.
|
||||
|
||||
use std::cell::Cell;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Fuzzy search algorithm based on the one used in VS Code (`/src/vs/base/common/fuzzyScorer.ts`).
|
||||
//! Other algorithms exist, such as Sublime Text's, or the one used in `fzf`,
|
||||
//! but I figured that this one is what lots of people may be familiar with.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Provides fast, non-cryptographic hash functions.
|
||||
|
||||
/// The venerable wyhash hash function.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Random assortment of helpers I didn't know where to put.
|
||||
|
||||
use std::alloc::Allocator;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Bindings to the ICU library.
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Parses VT sequences into input events.
|
||||
//!
|
||||
//! In the future this allows us to take apart the application and
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![feature(
|
||||
allocator_api,
|
||||
breakpoint,
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Oklab colorspace conversions.
|
||||
//!
|
||||
//! Implements Oklab as defined at: <https://bottosson.github.io/posts/oklab/>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Path related helpers.
|
||||
|
||||
use std::ffi::OsStr;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! `memchr`, but with two needles.
|
||||
|
||||
use std::ptr;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! `memchr`, but with two needles.
|
||||
|
||||
use std::ptr;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! `memchr` for arbitrary sizes (1/2/4/8 bytes).
|
||||
//!
|
||||
//! Clang calls the C `memset` function only for byte-sized types (or 0 fills).
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Provides various high-throughput utilities.
|
||||
|
||||
mod memchr2;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Platform abstractions.
|
||||
|
||||
use std::fs::File;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Unix-specific platform code.
|
||||
//!
|
||||
//! Read the `windows` module for reference.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::ffi::{CStr, OsString, c_void};
|
||||
use std::fmt::Write as _;
|
||||
use std::fs::{self, File};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! An immediate mode UI framework for terminals.
|
||||
//!
|
||||
//! # Why immediate mode?
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::hint::cold_path;
|
||||
|
||||
use super::Utf8Chars;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Everything related to Unicode lives here.
|
||||
|
||||
mod measurement;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// BEGIN: Generated by grapheme-table-gen on 2025-03-31T16:50:08Z, from Unicode 16.0.0, with --lang=rust --extended --no-ambiguous --line-breaks, 16950 bytes
|
||||
#[rustfmt::skip]
|
||||
const STAGE0: [u16; 544] = [
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
use std::{hint, iter};
|
||||
|
||||
/// An iterator over UTF-8 encoded characters.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
//! Our VT parser.
|
||||
|
||||
use std::{mem, time};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
mod rules;
|
||||
|
||||
use crate::rules::{JOIN_RULES_GRAPHEME_CLUSTER, JOIN_RULES_LINE_BREAK};
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
// Used as an indicator in our rules for ÷ ("does not join").
|
||||
// Underscore is one of the few characters that are permitted as an identifier,
|
||||
// are monospace in most fonts and also visually distinct from the digits.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue